Skip to content

Latest commit

 

History

History
44 lines (38 loc) · 2.57 KB

README.md

File metadata and controls

44 lines (38 loc) · 2.57 KB

Overview

Here are a few tutorials meant to get you started quickly with using the reddit API. It's meant to take no more than a weekend to go through and provide you with the building blocks you need to do your own projects using Reddit.
NOTE: Reddit has a limit of 1000 values per request. See the Pushshift Notebook on how to get around that.

Install Steps

If this is your first tutorial you've used please start with installing miniconda and cloning the repo.
Install miniconda https://docs.conda.io/en/latest/miniconda.html (choose latest python version under your OS. Likely 64 bit)

git clone https://github.com/rogerfitz/tutorials
cd tutorials

The exact python version doesn't matter because with each project I'll have you create a different environment with the proper version of python.

From the tutorials directory

git pull origin master
cd subreddit_analysis
conda create -n subreddit_analysis python=3.9 pandas=1.3.2 jupyter=1.0.0 matplotlib=3.4.2 -y
conda activate subreddit_analysis
pip install -r requirements.txt

Running the Code

jupyter notebook

Modules

  1. Project setup and API Basics
  2. Top Links over period part 1 part 2
    • Say you're interested in knowing what sites are biggest in the /r/learnpython community
  3. Analyze the interests of people who comment on a post
  4. How to Use the Reddit API with Pushshift to Bypass API Limits

Further work ideas

[website, Reddit bot, argument detection, proper NSFW categorizer that lets you filter out porn but keep the rest]

Other

Feedback welcome!
I've considered adding a .py example with usage like python analyze_subreddit --name learnpython. If you'd like me to make that let me know