MCPcopy Index your code
hub / github.com/Python3WebSpider/ProxyPool / extract_auth_proxy

Function extract_auth_proxy

proxypool/utils/proxy.py:74–83  ·  view source on GitHub ↗

extract host and port from a proxy with authentication

(data: str)

Source from the content-addressed store, hash-verified

72
73
74def extract_auth_proxy(data: str) -> (str, str):
75 """
76 extract host and port from a proxy with authentication
77 """
78 auth = data.split('@')[0]
79 ip_port = data.split('@')[1]
80 ip = ip_port.split(':')[0]
81 port = ip_port.split(':')[1]
82 host = auth + '@' + ip
83 return host, port
84
85
86if __name__ == '__main__':

Callers 3

is_valid_proxyFunction · 0.85
convert_proxy_or_proxiesFunction · 0.85
proxy.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected