|
@@ -135,7 +135,7 @@ class ListSpider:
|
|
|
"l_np_publishtime": int2long(int(time.mktime(time.strptime(publish_time, "%Y-%m-%d")))),
|
|
|
}
|
|
|
if title is None:
|
|
|
- logger.error(f"[标题异常]{competehref}")
|
|
|
+ logger.error(f"[标题为空]{competehref}")
|
|
|
continue
|
|
|
results.append(item)
|
|
|
|
|
@@ -143,8 +143,7 @@ class ListSpider:
|
|
|
for item in results:
|
|
|
sign = sha1(item['competehref'])
|
|
|
if not self.r.hexists(self.redis_key, sign):
|
|
|
- # item['count'] = es_query(item["title"], item["l_np_publishtime"])
|
|
|
- item['count'] = 0
|
|
|
+ item['count'] = es_query(item["title"], item["l_np_publishtime"])
|
|
|
item['crawl'] = False
|
|
|
# print(f'>>> {title} - {competehref}')
|
|
|
insert_items.append(item)
|