MCPcopy Create free account
hub / github.com/0x676e67/wreq-python / main

Function main

python/examples/blocking/client.py:27–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26
27def main():
28 client = BlockingClient(
29 impersonate=Impersonate.Firefox133,
30 user_agent="rnet",
31 proxies=[
32 Proxy.http("socks5h://abc:def@127.0.0.1:1080"),
33 Proxy.https(url="socks5h://127.0.0.1:1080", username="abc", password="def"),
34 Proxy.http(url="http://abc:def@127.0.0.1:1080", custom_http_auth="abcedf"),
35 Proxy.all(
36 url="socks5h://abc:def@127.0.0.1:1080",
37 exclusion="google.com, facebook.com, twitter.com",
38 ),
39 ],
40 )
41 resp = client.get("https://api.ip.sb/ip")
42 print("Status Code: ", resp.status_code)
43 print("Version: ", resp.version)
44 print("Response URL: ", resp.url)
45 print("Headers: ", resp.headers)
46 print("Content-Length: ", resp.content_length)
47 print("Encoding: ", resp.encoding)
48 print("Remote Address: ", resp.remote_addr)
49 print("Text: ", resp.text())
50
51
52if __name__ == "__main__":

Callers 1

client.pyFile · 0.70

Calls 3

getMethod · 0.95
BlockingClientClass · 0.85
textMethod · 0.45

Tested by

no test coverage detected