Skip to content

Reddit Scraper

To obtain investment theses from Reddit, I utilized PRAW, an unofficial but widely used Python wrapper for Reddit’s official API. PRAW allows free and straightforward scraping of Reddit posts.

The approach involves iterating through a predefined list of relevant subreddits. For each subreddit in this list, a specified number (num_posts) of recent posts is retrieved. From each post, the necessary information is extracted, stored in a dictionary, and appended to a list of dictionaries. Finally, this structured list containing all scraped post information is returned for further analysis.