소스 검색

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(