Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid KeyError on Pocket API parser #843

Merged
merged 1 commit into from
Nov 12, 2021
Merged

Conversation

bltavares
Copy link
Contributor

Summary

When trying to import my pocket library I got a lot of KeyError on Python. Pocket API has a few idiosyncrasies, such as sometimes returning the keys on json, sometimes not.

sh archivebox add --parser pocket_api pocket://my_username

Gave me this errors
File "/app/archivebox/parsers/pocket_api.py", line 54, in link_from_article title = article['resolved_title'] or article['given_title'] or url KeyError: 'resolved_title'

This commit are the patches I've changed to successfully import my library

Related issues

#528

Changes these areas

  • Bugfixes
  • Feature behavior
  • Command line interface
  • Configuration options
  • Internal architecture
  • Snapshot data layout on disk

When trying to import my pocket library I got a lot of ` KeyError`  on Python. Pocket API has a few idiosyncrasies, such as sometimes returning the keys on json, sometimes not.

` ` ` sh
archivebox add --parser pocket_api pocket://my_username
` ` ` 

Gave me this errors
` ` ` 
  File "/app/archivebox/parsers/pocket_api.py", line 54, in link_from_article
    title = article['resolved_title'] or article['given_title'] or url
KeyError: 'resolved_title'
` ` ` 

This commit are the patches I've changed to successfully import my library
@mAAdhaTTah
Copy link
Contributor

@pirate Can we merge this? I'm running into this myself.

@pirate
Copy link
Member

pirate commented Nov 12, 2021

thanks @bltavares!! Sorry for the delay, have been on a road trip without my laptop the last few months, just getting back into the swing of things now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants