fix: [update v2.6] fix faup encoding

This commit is contained in:
Terrtia 2019-12-17 16:26:21 +01:00
parent ef55024195
commit 7420ee26a9
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -23,7 +23,12 @@ def get_all_item(screenshot_sha256):
def sanitize_domain(domain):
faup.decode(domain)
domain_sanitized = faup.get()
return domain_sanitized['domain'].lower()
domain_sanitized = domain_sanitized['domain']
try:
domain_sanitized = domain_sanitized.decode()
except:
pass
return domain_sanitized.lower()
def update_db(screenshot_sha256):
screenshot_items = get_all_item(screenshot_sha256)