import pandas as pd
posts = []
ml_subreddit = reddit.subreddit('Oregon')
for post in ml_subreddit.hot(limit=None):
posts.append([post.title, post.score, post.id, post.subreddit, post.url, post.num_comments, post.selftext, post.created])
posts = pd.DataFrame(posts,columns=['title', 'score', 'id', 'subreddit', 'url', 'num_comments', 'body', 'created'])
posts.sort_values(by=['num_comments'], inplace=True, ascending=False)
posts[posts.num_comments > 5]
有了这段代码,我可以从子Reddit“Oregon”中提取包含5条以上注释的线程。如何检索包含特定关键字和地理过滤视图的线程
目前没有回答
相关问题 更多 >
编程相关推荐