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.

JO

Get a comments corresponding post_id

Closed

joneswastaken opened this issue
4 months 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.

trudax avatar

Great suggestion! I will work on it.

trudax avatar

Done

Developer
Maintained by Community
Actor metrics
  • 275 monthly users
  • 23 stars
  • 100.0% runs succeeded
  • 23 hours response time
  • Created in Feb 2022
  • Modified 16 days ago
Categories