mirror of https://github.com/CIRCL/lookyloo
fix: Do not fail if the meta file is missing.
parent
6a12c003f0
commit
f4bf64a485
|
@ -331,8 +331,9 @@ class Lookyloo():
|
||||||
|
|
||||||
def load_tree(self, capture_dir: Path) -> Tuple[str, str, str, str, Dict[str, str]]:
|
def load_tree(self, capture_dir: Path) -> Tuple[str, str, str, str, Dict[str, str]]:
|
||||||
meta = {}
|
meta = {}
|
||||||
with open((capture_dir / 'meta'), 'r') as f:
|
if (capture_dir / 'meta').exists():
|
||||||
meta = json.load(f)
|
with open((capture_dir / 'meta'), 'r') as f:
|
||||||
|
meta = json.load(f)
|
||||||
ct = self.get_crawled_tree(capture_dir)
|
ct = self.get_crawled_tree(capture_dir)
|
||||||
return ct.to_json(), ct.start_time.isoformat(), ct.user_agent, ct.root_url, meta
|
return ct.to_json(), ct.start_time.isoformat(), ct.user_agent, ct.root_url, meta
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue