无法解析导入"praw"



如何修复:import "无法解析

下面是我的代码:
import praw
reddit = praw.Reddit(
client_id="",
client_secret="",
user_agent="",
username="",
password="",
)
subreddit = reddit.subreddit("memes")
top = subreddit.top(limit = 5)
for submission in top:
print(submission.title)

这也发生在我身上。简单的解决方案是使用asyncpraw

pip install asyncpraw

我是这样做的:-


reddit = asyncpraw.Reddit(client_id = '',
client_secret = '',
username = '',
password = '',
user_agent = '')
subreddit = await reddit.subreddit("memes)
top = subreddit.top(limit=5)
for submission in top:
print(submission.title)

相关内容

  • 没有找到相关文章

最新更新