Browse Source

视频号抓取任务

luojunhui 3 months ago
parent
commit
dba428278c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tasks/crawler_channel_account_videos.py

+ 4 - 0
tasks/crawler_channel_account_videos.py

@@ -80,6 +80,10 @@ class CrawlerChannelAccountVideos:
             )
             )
             return
             return
 
 
+        video_length = video['objectDesc']['media'][0]['VideoPlayLen']
+        if video_length and int(video_length) > 300:
+            return
+
         video_item = Item()
         video_item = Item()
         video_id = video["id"]
         video_id = video["id"]
         video_item.add("content_trace_id", "video{}".format(str_to_md5(str(video_id))))
         video_item.add("content_trace_id", "video{}".format(str_to_md5(str(video_id))))