fix: [update v2.6] fix faup encoding

pull/453/head v2.6
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
1 changed files with 6 additions and 1 deletions

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)