fix: 确保代理数据检索中的URL以http://开头

This commit is contained in:
晓丰 2025-05-30 20:57:03 +08:00
parent 85b45ac49d
commit 6d5941cd17

5
DB.py
View File

@ -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 ""