[PR #1365] [MERGED] Fix generic_json parser #4407

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

📋 Pull Request Information

Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/1365
Author: @jimwins
Created: 2/27/2024
Status: Merged
Merged: 3/1/2024
Merged by: @pirate

Base: devHead: issue-1347


📝 Commits (2)

  • 178e676 Fix JSON parser by not always mangling the input
  • ccabda4 Handle list of tags in JSON, and be more clever about comma vs. space

📊 Changes

4 files changed (+85 additions, -4 deletions)

View changed files

📝 archivebox/parsers/generic_json.py (+20 -4)
tests/mock_server/templates/example.json (+6 -0)
tests/mock_server/templates/example.json.bad (+2 -0)
📝 tests/test_add.py (+57 -0)

📄 Description

Summary

This fixes the generic_json parser by not always assuming the JSON needs special handling and doing a more straightforward workaround when it might.

Also adds support for a tags field.

Related issues

Fixes #1347.

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/1365 **Author:** [@jimwins](https://github.com/jimwins) **Created:** 2/27/2024 **Status:** ✅ Merged **Merged:** 3/1/2024 **Merged by:** [@pirate](https://github.com/pirate) **Base:** `dev` ← **Head:** `issue-1347` --- ### 📝 Commits (2) - [`178e676`](https://github.com/ArchiveBox/ArchiveBox/commit/178e676e0f27704b1ead99c554f8a65426bc9ca8) Fix JSON parser by not always mangling the input - [`ccabda4`](https://github.com/ArchiveBox/ArchiveBox/commit/ccabda4c7d17f064feb413e9268b7d0c4f02029f) Handle list of tags in JSON, and be more clever about comma vs. space ### 📊 Changes **4 files changed** (+85 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `archivebox/parsers/generic_json.py` (+20 -4) ➕ `tests/mock_server/templates/example.json` (+6 -0) ➕ `tests/mock_server/templates/example.json.bad` (+2 -0) 📝 `tests/test_add.py` (+57 -0) </details> ### 📄 Description # Summary This fixes the `generic_json` parser by not always assuming the JSON needs special handling and doing a more straightforward workaround when it might. Also adds support for a tags field. # Related issues Fixes #1347. # 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:42:50 +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#4407
No description provided.