Browse Source

竖版视频下载后,不满足上传规则,需要删除其所在文件夹

wangkun 3 years ago
parent
commit
2c2314c5ed
2 changed files with 8 additions and 0 deletions
  1. 7 0
      main/demo.py
  2. 1 0
      main/recommend_list.py

File diff suppressed because it is too large
+ 7 - 0
main/demo.py


+ 1 - 0
main/recommend_list.py

@@ -354,6 +354,7 @@ class Recommend:
                         return
                     # 竖版视频不下载,写入竖版视频表
                     elif int(video_info[0]) < int(video_info[1]):
+                        shutil.rmtree("./videos/" + download_video_title + "/")
                         # 删除在 recommend_feeds 的记录
                         Feishu.dimension_range(log_type, "music_album", "69UxPo", "ROWS", i + 1, i + 1)
                         Common.logger(log_type).info("宽:{}<高:{},删除成功", int(video_info[0]), int(video_info[1]))

Some files were not shown because too many files changed in this diff