Browse Source

Skip first line of the "JSON" file

ArchiveBox moves the file to parse to the sources directory and adds the
original filename at the top, making the file invalid.
Bartłomiej Piotrowski 3 years ago
parent
commit
eb97fd427b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      archivebox/parsers/generic_json.py

+ 1 - 0
archivebox/parsers/generic_json.py

@@ -17,6 +17,7 @@ def parse_generic_json_export(json_file: IO[str], **_kwargs) -> Iterable[Link]:
     """Parse JSON-format bookmarks export files (produced by pinboard.in/export/, or wallabag)"""
     """Parse JSON-format bookmarks export files (produced by pinboard.in/export/, or wallabag)"""
 
 
     json_file.seek(0)
     json_file.seek(0)
+    next(json_file)
     links = json.load(json_file)
     links = json.load(json_file)
     json_date = lambda s: datetime.strptime(s, '%Y-%m-%dT%H:%M:%S%z')
     json_date = lambda s: datetime.strptime(s, '%Y-%m-%dT%H:%M:%S%z')