mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-22 05:46:42 +08:00
Fixed Invalid IPv6 URL exception with common fix
This commit is contained in:
parent
b73c7866e0
commit
6edc196163
2 changed files with 15 additions and 3 deletions
|
@ -310,12 +310,24 @@ def process_url(
|
|||
url = f"https://{url}"
|
||||
|
||||
# Get parsed URL as we might need it later
|
||||
parsed_url = urlsplit(url)
|
||||
try:
|
||||
parsed_url = urlsplit(url)
|
||||
except ValueError as e:
|
||||
if fail_silently:
|
||||
parsed_url = url
|
||||
else:
|
||||
raise e
|
||||
else:
|
||||
parsed_url = url
|
||||
|
||||
# Get (sub) domain name
|
||||
domain_name = parsed_url.hostname
|
||||
try:
|
||||
domain_name = parsed_url.hostname
|
||||
except AttributeError as e:
|
||||
if fail_silently:
|
||||
domain_name = None
|
||||
else:
|
||||
raise e
|
||||
|
||||
if not domain_name:
|
||||
if fail_silently:
|
||||
|
|
|
@ -127,7 +127,7 @@ webencodings==0.5.1
|
|||
backports.functools-lru-cache==1.6.4
|
||||
fcache==0.4.7
|
||||
json_tricks==3.15.5
|
||||
tld==0.12.6
|
||||
tld==0.12.6 # https://github.com/barseghyanartur/tld/pull/119
|
||||
|
||||
# Required-by: requests
|
||||
certifi==2021.10.8
|
||||
|
|
Loading…
Reference in a new issue