Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey, it's me again.
This PR adds support for scraping information from reviews, as well as posting & deleting comments, subscribing & unsubscribing to/from the comment section and voting on the review.
I have added a new class representing an existing review which scrapes various information from the DOM; the whole content is documented in this typedef.
It is sadly not easily possible to scrape more than the last 10 comments because the page navigator does not load when scraping.
If the first page always shows exactly 10 comments, one could calculate the amount of pages using the commentsAmount value. Requesting specific pages can be done using the
ctp
query parameter, like I've done in my other discussions PR. (That PR is still open and ready for review btw)The functions already mentioned above are implemented in
components/reviews.js
, as usual.I have not implemented support for posting reviews, as well as reporting existing reviews.
Test code for scraping info, posting a comment, subscribing to comments and voting funny on my Aperture Desk Job review:
Everything implemented has been tested and worked as expected for me - I hope I didn't miss anything.
Have a nice day :)