Skip to content

gsig123/reddit_scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Reddit Scraper

A simple scraper that scrapes the top X posts from a given subreddit thread, and the top level comments belonging to those posts.

This simple scraper was created for an academic project.

Setup

  • Set up an app here.
  • Fill out the KEY_sample.py and rename it to KEY.py.

Usage

# Create your virtual environment, f.x.:
python3 -m venv reddit-scrape
# Activate it, f.x.:
. reddit-scrape/bin/activate
# Install dependencies 
pip install -r requirements.txt 
# Run the scraper 
python scraper <subreddit-name> <number-of-posts>

The script creates two files: <subreddit-name>_posts.csv and <subreddit-name>_comments.csv

About

A simple scraper created for academic research.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages