We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
使用 bilibili-api 库 时按照 文档:同步执行异步代码 编写了如下代码
from bilibili_api import sync from bilibili_api.favorite_list import get_video_favorite_list, get_video_favorite_list_content favorite_list = sync(get_video_favorite_list(uid=uid, credential=credential)) list = favorite_list['list'] for i in range(len(list)): favorite = list[i] favorite['list'] = sync(get_video_favorite_list_content(media_id=favorite['id']))
产生报错 RuntimeError: There is no current event loop in thread 'Thread-14'
RuntimeError: There is no current event loop in thread 'Thread-14'
经检查,当在 Flask 换将中使用上述代码才会报错,单独使用这段代码是没有问题的。
Flask
最后问题也没有解决,经过搜索发现 Python 异步的风评比较差,就更换了 Puppeteer 来做爬虫 但其实离线同步数据到数据库也可以满足我的需求,但确实不优美
The text was updated successfully, but these errors were encountered:
No branches or pull requests
使用 bilibili-api 库 时按照 文档:同步执行异步代码 编写了如下代码
产生报错
RuntimeError: There is no current event loop in thread 'Thread-14'
经检查,当在
Flask
换将中使用上述代码才会报错,单独使用这段代码是没有问题的。The text was updated successfully, but these errors were encountered: