mirror of https://github.com/CIRCL/lookyloo
fix: Do not fail on MISP export if there are no redirects
parent
3b8b3faff4
commit
7241ae2ea1
|
@ -924,6 +924,7 @@ class Lookyloo():
|
||||||
initial_url = URLObject(cache["url"]) # type: ignore
|
initial_url = URLObject(cache["url"]) # type: ignore
|
||||||
redirects = [URLObject(url) for url in cache['redirects']] # type: ignore
|
redirects = [URLObject(url) for url in cache['redirects']] # type: ignore
|
||||||
|
|
||||||
|
if redirects:
|
||||||
initial_url.add_reference(redirects[0], 'redirects-to')
|
initial_url.add_reference(redirects[0], 'redirects-to')
|
||||||
prec_object = redirects[0]
|
prec_object = redirects[0]
|
||||||
for u_object in redirects[1:]:
|
for u_object in redirects[1:]:
|
||||||
|
|
Loading…
Reference in New Issue