Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🍲修复异步下载失败率高的问题, fix #496 #502 #503 #505 #506

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

daymade
Copy link
Contributor

@daymade daymade commented Aug 11, 2023

代码中使用了 asyncio.create_task() 来创建并运行异步任务,但是没有等待这些任务完成。这就是为什么当调用 await AwemeDownload() 时,该函数并不会等待所有的 aweme_data 下载完成。

创建了一个任务列表,然后在函数的末尾使用 await asyncio.gather(*tasks) 来等待所有的任务完成。

保证下载完当前页的作品之后再去下载下一页的作品, 避免同时下载好几页的视频, 连接数过多被抖音服务器中断连接.

这个 bug 只影响作品数多的作者, 所以 14000 版本的默认作者"小米粉"是可以正常下载的.

@Johnserf-Seed
Copy link
Owner

非常感谢你解决了这个问题,赞👍!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants