Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions getproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import time
from requests.exceptions import ConnectionError, HTTPError, RequestException


class DownloadProxies:
def __init__(self) -> None:
self.api = {
Expand Down Expand Up @@ -51,10 +52,10 @@ def get_special1(self):
proxies += proxy[0] + ":" + proxy[1] + "\n"
if proxies != '':
proxy_list += proxies.split('\n')
except:
except BaseException:
pass
return proxy_list
except:
except BaseException:
return []

def get_special2(self):
Expand All @@ -66,7 +67,7 @@ def get_special2(self):
for p in proxies['data']:
protocol = 'http' if p['protocols'][0] == 'https' else p['protocols'][0]
self.proxy_dict[protocol].append('{}:{}'.format(p['ip'], p['port']))
except:
except BaseException:
pass

def get(self):
Expand Down