fix: update proxy fetching method to use fetch_proxies2 in main execution

This commit is contained in:
晓丰 2025-05-28 22:40:05 +08:00
parent 6f866982a1
commit d015dd8266

View File

@ -170,7 +170,7 @@ def refill_queue(r: redis.Redis, region_name: str, region_code: str,
to_fetch = batch - length
print(f"[{time.strftime('%H:%M:%S')}] {key} 长度 {length} < {low},一次性拉取 {to_fetch} 条…")
proxies = fetch_proxies4(region_code, to_fetch)
proxies = fetch_proxies2(region_code, to_fetch)
if proxies:
r.rpush(key, *proxies)
print(f"[{time.strftime('%H:%M:%S')}] 已入队 {len(proxies)} 条 → 新长度 {r.llen(key)}")
@ -203,5 +203,5 @@ def main():
if __name__ == "__main__":
# main()
print(fetch_proxies2('TW', 2))
main()
# print(fetch_proxies2('TW', 2))