luojunhui 3 месяцев назад
Родитель
Сommit
dba428278c
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      tasks/crawler_channel_account_videos.py

+ 4 - 0
tasks/crawler_channel_account_videos.py

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