fix: correct
escape sequences in fetch_proxy_list (syntax error)
This commit is contained in:
@@ -469,10 +469,8 @@ def fetch_proxy_list(url: str) -> str:
|
||||
log_connection(f"HTTP GET {url} (no-proxy)")
|
||||
with NO_PROXY_OPENER.open(req, timeout=20) as resp:
|
||||
text = resp.read(_PROXY_FETCH_LIMIT).decode("utf-8", "replace")
|
||||
if "
|
||||
" not in text and re.search(r"\s", text):
|
||||
text = re.sub(r"\s+", "
|
||||
", text.strip())
|
||||
if "\n" not in text and re.search(r"\s", text):
|
||||
text = re.sub(r"\s+", "\n", text.strip())
|
||||
_proxy_cache[url] = (now, text)
|
||||
return text
|
||||
|
||||
|
||||
Reference in New Issue
Block a user