This code is based on https://github.com/ianhussey/RedditCommentScraper
Scrape comments from a given thread on reddit.com using PRAW
Copyright (c) gyrusdentatus 2017 ([email protected])
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
1.0 (20/11/2017)
- Scrapes all comments from a given reddit thread
- Extracts top level comments
- Saves to a csv file (??? writer)
None.
- Although the script only uses publiclly available information, PRAW's call to the reddit API requires a reddit login (see line 44).
- Reddit API limits number of calls (1 per second IIRC). For a large thread (e.g., 1000s of comments) script execution time may therefore be c.1 hour.
- To configure,
cp Scraper_config.py.example Scraper_config.py
and edit that file. To extract more comment fields such as author and creation date, override thecomment_to_list
function in the config file.