Browse Source

develop baidu video downloader

luojunhui 3 tháng trước cách đây
mục cha
commit
afbb6a384b
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      coldStartTasks/multi_modal/generate_text_from_video.py

+ 2 - 0
coldStartTasks/multi_modal/generate_text_from_video.py

@@ -157,6 +157,8 @@ class GenerateTextFromVideo(object):
                                     os.remove(video_local_path)
                                 tqdm.write("video transform to text success, delete local file, sleep 1 min...")
                                 task_list.remove(task)
+                                self.google_ai_api.delete_video(file_name)
+                                print("delete video from google success: {}".format(file_name))
                         except Exception as e:
                             tqdm.write(str(e))
                             continue