Kaynağa Gözat

视频号抓取任务

luojunhui 3 ay önce
ebeveyn
işleme
39d7dd230c
1 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. 4 4
      tasks/crawler_channel_account_videos.py

+ 4 - 4
tasks/crawler_channel_account_videos.py

@@ -49,7 +49,7 @@ class CrawlerChannelAccountVideos:
 
         return False
 
-    def get_channel_account_list(self):
+    def get_channel_account_list(self) -> list[dict]:
         """
         get channel account list from database
         """
@@ -57,7 +57,7 @@ class CrawlerChannelAccountVideos:
         account_list = self.db_client.fetch(query=sql, cursor_type=DictCursor)
         return account_list
 
-    def crawler_each_video(self, video: dict):
+    def crawler_each_video(self, video: dict) -> None:
         """
         download each video
         save video and decrypt video
@@ -128,7 +128,7 @@ class CrawlerChannelAccountVideos:
                 },
             )
 
-    def crawler_each_account(self, channel_account: dict, last_buffer: str = ""):
+    def crawler_each_account(self, channel_account: dict, last_buffer: str = "") -> None:
         """
         get channel account videos
         """
@@ -173,7 +173,7 @@ class CrawlerChannelAccountVideos:
             )
             return
 
-    def update_account_max_cursor(self, account_id):
+    def update_account_max_cursor(self, account_id: str) -> None:
         """
         update account max cursor
         """