Преглед изворни кода

2024-06-06
上线了新etl, 目的是解决封面下载失败的问题

取消了自动加白名单的功能

罗俊辉 пре 1 година
родитељ
комит
be368f3411
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      applications/functions/async_etl.py

+ 2 - 2
applications/functions/async_etl.py

@@ -220,9 +220,9 @@ class AsyncETL(object):
             local_video_path=file_path,
         )
         # 读取cover, 若img是html格式,则不上传
-        with open(cover_path, encoding="utf-8") as f:
+        with open(cover_path, "wb") as f:
             img_data = f.read()
-        if "<html>" in img_data:
+        if b"<html>" in img_data:
             oss_cover = None
         else:
             oss_cover = await upload_to_oss(