فهرست منبع

新增公众号抓取

luojunhui 1 ماه پیش
والد
کامیت
178e3357d2
1فایلهای تغییر یافته به همراه7 افزوده شده و 6 حذف شده
  1. 7 6
      applications/tasks/crawler_tasks/crawler_gzh.py

+ 7 - 6
applications/tasks/crawler_tasks/crawler_gzh.py

@@ -214,7 +214,7 @@ class CrawlerGzhAccountArticles(CrawlerGzhBaseStrategy):
                         "task": "crawler_gzh_articles",
                         "trace_id": self.trace_id,
                         "data": {
-                            "account_id": account["account_id"],
+                            "account_id": account["gh_id"],
                             "account_method": method,
                             "error": str(e),
                             "traceback": traceback.format_exc(),
@@ -227,10 +227,11 @@ class CrawlerGzhSearchArticles(CrawlerGzhBaseStrategy):
     def __init__(self, pool, log_client, trace_id):
         super().__init__(pool, log_client, trace_id)
 
-    async def search_each_title(self, title: str) -> None:
+    async def search_each_title(self, title: str, page='1') -> None:
         """search in weixin"""
-        search_response = await weixin_search(keyword=title)
-        print(search_response)
+        search_response = await weixin_search(keyword=title, page=page)
+
+
 
     async def deal(self, date_string: str, strategy: str = "V1"):
         hot_titles = await get_hot_titles(self.pool, date_string=date_string)
@@ -242,6 +243,6 @@ class CrawlerGzhSearchArticles(CrawlerGzhBaseStrategy):
 #     import asyncio
 #     response = asyncio.run(weixin_search(keyword="南京照相馆"))
 #     print(json.dumps(response, ensure_ascii=False, indent=4))
-#
-#
+
+