MCPcopy
hub / github.com/ArchiveBox/ArchiveBox / parse_json_links_details

Function parse_json_links_details

archivebox/index/json.py:117–128  ·  view source on GitHub ↗

read through all the archive data folders and return the parsed links

(out_dir: Union[Path, str])

Source from the content-addressed store, hash-verified

115
116@enforce_types
117def parse_json_links_details(out_dir: Union[Path, str]) -> Iterator[Link]:
118 """read through all the archive data folders and return the parsed links"""
119
120 for entry in os.scandir(Path(out_dir) / ARCHIVE_DIR_NAME):
121 if entry.is_dir(follow_symlinks=True):
122 if (Path(entry.path) / 'index.json').exists():
123 try:
124 link = parse_json_link_details(entry.path)
125 except KeyError:
126 link = None
127 if link:
128 yield link
129
130
131

Callers 2

initFunction · 0.85
statusFunction · 0.85

Calls 1

parse_json_link_detailsFunction · 0.85

Tested by

no test coverage detected