【问题标题】:How to get a random subreddit using praw and python3?如何使用 praw 和 python3 获得随机 subreddit?
【发布时间】:2018-03-20 22:15:36
【问题描述】:

我试过谷歌搜索,我能找到的只是如何从特定的 subreddit 获得随机提交,而不是随机的 subreddit。我记得几周前在某个网站上读到过它,但我一生都找不到它在哪里。

【问题讨论】:

  • 请展示一些你尝试过的东西,你发现了什么,并在这个问题上付出更多的努力。

标签: python python-3.x reddit praw


【解决方案1】:

random_subreddit(nsfw=False)

返回Subreddit 的随机惰性实例。

参数:nsfw – 返回一个随机的 NSFW(工作不安全)subreddit (默认:假)。

查看文档here。看random_subreddit()方法。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-10-07
    • 2020-09-22
    • 2018-09-27
    • 1970-01-01
    • 2019-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多