fix: 确保代理数据检索中的URL以http://开头
This commit is contained in:
parent
85b45ac49d
commit
6d5941cd17
5
DB.py
5
DB.py
@ -440,7 +440,10 @@ class DBVidcon:
|
||||
proxies = json.loads(list_json_str)
|
||||
idx = int(conf_str)
|
||||
entry = proxies[idx]
|
||||
return entry.get("data", {}).get(region_code, "")
|
||||
result = entry.get("data", {}).get(region_code, "")
|
||||
if not result.startswith("http://"):
|
||||
result = "http://" + result
|
||||
return result
|
||||
except (ValueError, IndexError, KeyError, json.JSONDecodeError):
|
||||
return ""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user