Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

fix get_recent_comments on selenium/requests.Session (Fixes #124)#126

Closed
stefco wants to merge 1 commit into
chris-greening:masterfrom
stefco:fix-comments
Closed

fix get_recent_comments on selenium/requests.Session (Fixes #124)#126
stefco wants to merge 1 commit into
chris-greening:masterfrom
stefco:fix-comments

Conversation

@stefco

@stefco stefco commented Jun 19, 2021

Copy link
Copy Markdown

Description

Post.get_recent_comments would raise a KeyError when using Selenium or a requests.Session object to scrape a Post due to slight differences in the structure of the resulting json_dict. I added an except block to handle this and try the alternative json_dict schema.

Fixes #124

Checklist

  • I followed the guidelines in our Contributing document
  • I added an explanation of my changes
  • I have written new tests for my changes, as applicable
  • I successfully ran tests with my changes locally

Additional notes (optional)

Still need to write unit tests.

@stefco

stefco commented Jun 19, 2021

Copy link
Copy Markdown
Author

Moved this and several other suggested fixes to #125, easier to just track there.

@stefco stefco closed this Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_recent_comments() results in KeyError: 'entry_data'

1 participant