添加了对媒体资源服务器的异常处理,参见 issue #691

This commit is contained in:
未来可欺
2025-08-05 13:11:00 +08:00
parent b9d30bbabb
commit 81f2dbe4ab
8 changed files with 50 additions and 24 deletions

View File

@@ -362,6 +362,7 @@ class DouYinCrawler(AbstractCrawler):
if not url:
continue
content = await self.dy_client.get_aweme_media(url)
await asyncio.sleep(random.random())
if content is None:
continue
extension_file_name = f"{picNum:>03d}.jpeg"
@@ -385,6 +386,7 @@ class DouYinCrawler(AbstractCrawler):
if not video_download_url:
return
content = await self.dy_client.get_aweme_media(video_download_url)
await asyncio.sleep(random.random())
if content is None:
return
extension_file_name = f"video.mp4"