[PR #843] Avoid KeyError on Pocket API parser #2790

Closed
opened 2026-03-01 18:00:45 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/ArchiveBox/ArchiveBox/pull/843

State: closed
Merged: Yes


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
**Original Pull Request:** https://github.com/ArchiveBox/ArchiveBox/pull/843 **State:** closed **Merged:** Yes --- <!-- IMPORTANT: Do not submit PRs with only formatting / PEP8 / line length changes. --> # 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 <!--e.g. This PR fixes ABC or adds the ability to do XYZ...--> # Related issues #528 <!-- e.g. #123 or Roadmap goal # https://github.com/pirate/ArchiveBox/wiki/Roadmap --> # Changes these areas - [x] Bugfixes - [ ] Feature behavior - [ ] Command line interface - [ ] Configuration options - [ ] Internal architecture - [ ] Snapshot data layout on disk
kerem 2026-03-01 18:00:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#2790
No description provided.