import praw from reddit_scraper import download_subreddit_posts import accounts reddit = accounts.get_agent() subreddit = reddit.subreddit("haiku") download_subreddit_posts(subreddit, mode='hot', limit=1000, max_fails=1000)