fix: 修改 traffic_segment 的生成范围以确保更合理的值并更新 fetch_proxies3 的返回格式
This commit is contained in:
parent
94c15b8611
commit
39d4bc111a
2
main.py
2
main.py
@ -189,7 +189,7 @@ def gettoken():
|
|||||||
u = uuid.uuid4()
|
u = uuid.uuid4()
|
||||||
uuid_with_dash = str(u)
|
uuid_with_dash = str(u)
|
||||||
uuid_no_dash = u.hex
|
uuid_no_dash = u.hex
|
||||||
traffic_segment = str(random.randint(10 ** 8, 10 ** 9 - 1))
|
traffic_segment = str(random.randint(100_000, 999_999))
|
||||||
data = {
|
data = {
|
||||||
'client_id': 'f1a362d288c1b98099c7',
|
'client_id': 'f1a362d288c1b98099c7',
|
||||||
'client_secret': 'eea605b96e01c796ff369935357eca920c5da4c5',
|
'client_secret': 'eea605b96e01c796ff369935357eca920c5da4c5',
|
||||||
|
@ -43,7 +43,7 @@ def fetch_proxies3(region_code, n):
|
|||||||
except (RequestException, ValueError):
|
except (RequestException, ValueError):
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
return fetch_proxies3(region_code, n)
|
return fetch_proxies3(region_code, n)
|
||||||
result = resp.text.split("\r\n")
|
result = ["http://" + item for item in resp.text.split("\r\n")]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def fetch_proxies2(region_code, n):
|
def fetch_proxies2(region_code, n):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user