clean tuple
This commit is contained in:
parent
2077673849
commit
42f24ba169
@ -45,8 +45,15 @@ class ProxyElem():
|
||||
def __repr__(self):
|
||||
return str(self.proxy)
|
||||
async def proxy_url(self, urls):
|
||||
clean_urls = []
|
||||
for url in urls:
|
||||
if isinstance(url, tuple):
|
||||
clean_urls.append(url[0])
|
||||
else:
|
||||
clean_urls.append(url)
|
||||
if not isinstance(proxy_server, str):
|
||||
return urls
|
||||
return clean_urls
|
||||
|
||||
jdata = None
|
||||
data_list = []
|
||||
for url in urls:
|
||||
@ -73,14 +80,14 @@ class ProxyElem():
|
||||
logger.info(e)
|
||||
if isinstance(jdata, list):
|
||||
ret_data = []
|
||||
for src, dst in zip(urls, jdata):
|
||||
for src, dst in zip(clean_urls, jdata):
|
||||
if isinstance(src, str):
|
||||
ret_data.append(dst)
|
||||
else:
|
||||
ret_data.append(None)
|
||||
return ret_data
|
||||
else:
|
||||
return urls
|
||||
return clean_urls
|
||||
|
||||
proxies = {}
|
||||
new_providers = {}
|
||||
|
Loading…
Reference in New Issue
Block a user