|
@@ -122,7 +122,14 @@ class CrawlListPageSpider:
|
|
|
**label_item,
|
|
|
}
|
|
|
if not self.dedup.get(competehref):
|
|
|
- info["count"] = es_query(info["title"], info["l_np_publishtime"])
|
|
|
+ try:
|
|
|
+ count = es_query(info["title"], info["l_np_publishtime"])
|
|
|
+ except Exception as e:
|
|
|
+ logger.error(f"es 调用失败, 原因:{type(e).__name__}")
|
|
|
+ logger.exception(e)
|
|
|
+ count = 0
|
|
|
+
|
|
|
+ info["count"] = count
|
|
|
results.append(info)
|
|
|
self.dedup.add(competehref)
|
|
|
|