Reddit Scraper avatar
Reddit Scraper
Try for free

1 day trial then $45.00/month - No credit card required now

View all Actors
Reddit Scraper

Reddit Scraper

trudax/reddit-scraper
Try for free

1 day trial then $45.00/month - No credit card required now

Unlimited Reddit web scraper to crawl posts, comments, communities, and users without login. Limit web scraping by number of posts or items and extract all data in a dataset in multiple formats.

User avatar

Get a comments corresponding post_id

Closed

joneswastaken opened this issue
a month ago

Currently comments have an attribute for their parent. However, since comments on Reddit can be nested, often times the parent will be another comment. To get a comments corresponding post, one has to either build a tree using the given IDs and parent IDs and flatten the tree or parse a comments URL since the URL contains the ID of the comments post. E.g.: For the comment with this URL "https://www.reddit.com/r/pasta/comments/vwi6jx/pasta_peperoni_and_ricotta_cheese_how_to_make/ifu6eun" the posts id ID is "vwi6jx".

It would be helpful to add a field to comments along the lines of "post_id" which contains the ID of the post the comment was posted to.

User avatar

Great suggestion! I will work on it.

Developer
Maintained by Community
Actor metrics
  • 287 monthly users
  • 99.1% runs succeeded
  • 0.5 days response time
  • Created in Feb 2022
  • Modified 4 days ago
Categories