소스 검색

ycsd fix spider

zz 3 년 전
부모
커밋
d725e4418e
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      ydyspider/spiders/zwcontentlianshangSpider.py

+ 2 - 2
ydyspider/spiders/zwcontentlianshangSpider.py

@@ -13,7 +13,7 @@ class zwcontentlianshangSpider(zwcontentSpider.zwcontentSpider):
     base_url = 'http://cp.yqsd.cn/api/book'
     custom_settings = {
         'DOWNLOAD_DELAY': 0.01,
-        'LOG_FILE': 'content_spider/log/' + name + time.strftime("%Y-%m-%d", time.localtime()) + '.log'
+        'LOG_FILE': 'ydyspider/log/' + name + time.strftime("%Y-%m-%d", time.localtime()) + '.log'
     }
 
     def start_requests(self):
@@ -30,7 +30,7 @@ class zwcontentlianshangSpider(zwcontentSpider.zwcontentSpider):
             i = 0
             for item in result['data']:
                 i = i+1
-                if i > 1000:
+                if i > 10:
                     break
                 bid = item['id']
                 url = self.base_url + '/bookInfo/{}'.format(bid)