mirror of https://github.com/CIRCL/AIL-framework
fix: [helper dump_crawler] fix empty dict
parent
5377369032
commit
06ab66ff57
|
@ -54,9 +54,10 @@ for date in date_range:
|
||||||
print(domain)
|
print(domain)
|
||||||
h = HiddenServices(domain, 'onion')
|
h = HiddenServices(domain, 'onion')
|
||||||
item_core = h.get_domain_crawled_core_item()
|
item_core = h.get_domain_crawled_core_item()
|
||||||
l_pastes = h.get_last_crawled_pastes(item_root=item_core['root_item'])
|
if 'root_item' in item_core:
|
||||||
res = h.create_domain_basic_archive(l_pastes)
|
l_pastes = h.get_last_crawled_pastes(item_root=item_core['root_item'])
|
||||||
filename = os.path.join(save_path, '{}'.format(domain))
|
res = h.create_domain_basic_archive(l_pastes)
|
||||||
with open(filename, 'wb') as f:
|
filename = os.path.join(save_path, '{}'.format(domain))
|
||||||
shutil.copyfileobj(res, f)
|
with open(filename, 'wb') as f:
|
||||||
print('done')
|
shutil.copyfileobj(res, f)
|
||||||
|
print('done')
|
||||||
|
|
Loading…
Reference in New Issue