使用带有 colab 的 PRAW 来抓取 Reddit,我收到此错误:模块“asyncio”没有属性“get_running_loop”

问题描述

我正在尝试使用 PRAW 库(Reddit API 和 Google colab 的包装器)抓取 Reddit 数据。

我的代码是:

!pip install -q praw
!pip install --upgrade praw
import praw

r = praw.Reddit(username = "u/Afrouououz",password = 'my_account_password',client_id = "my_client_id",client_secret = "my_client_secret",user_agent="u/Afrouououz")

print(r.user.me())

它给了我这个错误

AttributeError: module 'asyncio' has no attribute 'get_running_loop'

谁能帮我解决这个问题?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)