fix: exception when missing favicon.

pull/888/head
Raphaël Vinot 2024-02-26 19:17:00 +01:00
parent 9e302a9b14
commit dd7ff71d0f
1 changed files with 2 additions and 0 deletions

View File

@ -865,6 +865,8 @@ class Lookyloo():
fav = self._get_raw(capture_uuid, 'potential_favicons.ico', all_favicons)
if not all_favicons and for_datauri:
favicon = fav.getvalue()
if not favicon:
return '', ''
mimetype = from_string(favicon, mime=True)
return mimetype, base64.b64encode(favicon).decode()
return fav