zhaoyang 2 tahun lalu
induk
melakukan
64db4be2f9
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      ydyspider/spiders/zycontentSpider.py

+ 2 - 2
ydyspider/spiders/zycontentSpider.py

@@ -17,11 +17,11 @@ class zycontentSpider(scrapy.Spider):
 
     def start_requests(self):
         self.crawler.stats.set_value('bid_list', [])
-        if hasattr(self,bid):
+        if hasattr(self,'bid'):
             param = self.bid
         else:
             param  = None
-        if hasattr(self,cp_name):
+        if hasattr(self,'cp_name'):
             cp_name = '' if  self.cp_name is None or self.cp_name == 'zycontent' else self.cp_name
         else:
             cp_name = 'zycontent'