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
[x] I followed the guidelines in our Contributing document
[x] 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
Description
Post.get_recent_comments
would raise aKeyError
when using Selenium or arequests.Session
object to scrape aPost
due to slight differences in the structure of the resultingjson_dict
. I added anexcept
block to handle this and try the alternativejson_dict
schema.Fixes #124
Checklist
Additional notes (optional)
Still need to write unit tests.