[PR #843] [MERGED] Avoid KeyError on Pocket API parser #4295

Closed
opened 2026-03-15 01:36:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/843
Author: @bltavares
Created: 9/8/2021
Status: Merged
Merged: 11/12/2021
Merged by: @pirate

Base: devHead: patch-1


📝 Commits (1)

  • bb2a2e7 Avoid KeyError on Pocket API parser

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 archivebox/parsers/pocket_api.py (+2 -2)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ArchiveBox/ArchiveBox/pull/843 **Author:** [@bltavares](https://github.com/bltavares) **Created:** 9/8/2021 **Status:** ✅ Merged **Merged:** 11/12/2021 **Merged by:** [@pirate](https://github.com/pirate) **Base:** `dev` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`bb2a2e7`](https://github.com/ArchiveBox/ArchiveBox/commit/bb2a2e758aff1953b0275a0fe18fb14ed1dd3daf) Avoid KeyError on Pocket API parser ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `archivebox/parsers/pocket_api.py` (+2 -2) </details> ### 📄 Description <!-- 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 01:36:53 +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#4295
No description provided.