This is a very covenient code to scrape reddit comments
Scrape Reddit Data using R.
This is a pretty convenient script for scrapping Reddit comments.
Requirements:
you need to have two piece of information:
Requiremnet 1:Go to the page you want to Scrape let say: https://www.reddit.com/r/television/
so here televison is the subreddit.Collect all subreddits manualy.
Requirement 2:Decide what is the minimum length you want to assume before you scrape a comment
lets call it threshold_for_comment
R
How to use this?
All you need to do is modify the code at two places:
Locate following lines and just plugin the desired values i.e. Subreddits and value for threshold_for_comment
subreddits<-c("television","todayilearned","news","worldnews","movies","videos","sports","pics","AskReddit","music")
threshold_for_comment<-100
Author | Working As | contact @ |
---|---|---|
Vinay Kumar | MS @ IIT-KGP | @github |
Surjodoy Ghosh Dastider | M-Tech @ IIT-KGP | @github |
You can contact [email protected] incase you are not getting the code/logic somewhere.