MCPcopy Create free account
hub / github.com/Boris-code/feapder / pull_proxies

Method pull_proxies

feapder/network/proxy_pool/proxy_pool.py:34–41  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32
33 @tools.retry(3, interval=5)
34 def pull_proxies(self):
35 resp = requests.get(self.proxy_api)
36 proxies = resp.text.strip()
37 resp.close()
38 if "{" in proxies or not proxies:
39 raise Exception("获取代理失败", proxies)
40 # 使用 /r/n 分隔
41 return proxies.split("\r\n")
42
43 def get_proxy(self):
44 try:

Callers 1

get_proxyMethod · 0.95

Calls 2

getMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected