fix: 修改 traffic_segment 的生成范围以确保更合理的值并更新 fetch_proxies3 的返回格式

This commit is contained in:
晓丰 2025-05-18 22:00:26 +08:00
parent 94c15b8611
commit 39d4bc111a
2 changed files with 2 additions and 2 deletions

View File

@ -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',

View File

@ -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):