sunxy il y a 1 an
Parent
commit
ab6adc1cc3
3 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 1 1
      ODPSQueryUtil.py
  2. 2 2
      ai_tag_task.py
  3. 2 2
      download_videos_task.py

+ 1 - 1
ODPSQueryUtil.py

@@ -15,7 +15,7 @@ odps = ODPS(
 
 def query_videos(start_idx, limit):
     # 查询视频标题的表现(从阿里云odps中查询)
-    sql = f"SELECT DISTINCT a.videoid, a.title, transed_video_path AS video_path FROM loghubods.video_return_top_500 a LEFT JOIN videoods.dim_video b ON      a.videoid = b.videoid LEFT JOIN videoods.wx_video c ON      a.videoid = c.id WHERE a.dt >= 20230101 LIMIT {start_idx}, {limit};"
+    sql = f"SELECT DISTINCT a.videoid, a.title, transed_video_path AS video_path FROM loghubods.video_return_top_500 a LEFT JOIN videoods.dim_video b ON      a.videoid = b.videoid LEFT JOIN videoods.wx_video c ON      a.videoid = c.id WHERE a.dt >= 20230101 ORDER BY videoid LIMIT {start_idx}, {limit};"
     result = []
     with odps.execute_sql(sql).open_reader() as reader:
         for record in reader:

+ 2 - 2
ai_tag_task.py

@@ -238,8 +238,8 @@ def timer_check():
 
 if __name__ == '__main__':
     # timer_check()
-    size = 500
-    for i in range(0, 500, size):
+    size = 1000
+    for i in range(0, 2000, size):
         print(f"query_videos start i = {i} ...")
         records = ODPSQueryUtil.query_videos(i, size)
         if records is None or len(records) == 0:

+ 2 - 2
download_videos_task.py

@@ -100,8 +100,8 @@ def timer_check():
 
 if __name__ == '__main__':
     # timer_check()
-    size = 1000
-    for i in range(0, 500, size):
+    size = 2000
+    for i in range(0, 1000, size):
         print(f"query_videos start i = {i} ...")
         records = ODPSQueryUtil.query_videos(i, size)
         if records is None or len(records) == 0: