Don't show clearnet http favicons

merge-requests/8/head
Bob Mottram 2021-01-05 21:30:56 +00:00
parent e5c4d9e69b
commit 6c44c8fcaa
1 changed files with 3 additions and 0 deletions

View File

@ -198,6 +198,9 @@ def _getNewswireFavicon(url: str) -> str:
"""
if '://' not in url:
return None
if url.startswith('http://'):
if not (url.endswith('.onion') or url.endswith('.i2p')):
return None
domain = url.split('://')[1]
if '/' not in domain:
return url + '/favicon.ico'