fix scraper

This commit is contained in:
jxxghp
2024-07-01 15:25:35 +08:00
parent 964e212831
commit 778b562cab
6 changed files with 18 additions and 482 deletions
+2
View File
@@ -350,6 +350,8 @@ class MediaChain(ChainBase, metaclass=Singleton):
tmp_file = settings.TEMP_PATH / _path.name
tmp_file.write_bytes(_content)
StorageChain().upload_file(fileitem=_fileitem, path=tmp_file)
if tmp_file.exists():
tmp_file.unlink()
def __save_image(_url: str) -> Optional[bytes]:
"""