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

Function main

python/examples/client.py:5–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4
5async def main():
6 client = Client(
7 impersonate=Impersonate.Firefox133,
8 user_agent="rnet",
9 proxies=[
10 Proxy.http("socks5h://abc:def@127.0.0.1:6152"),
11 Proxy.https(url="socks5h://127.0.0.1:6153", username="abc", password="def"),
12 Proxy.http(
13 url="http://abc:def@127.0.0.1:6152",
14 custom_http_auth="abcedf",
15 custom_http_headers={"User-Agent": "rnet", "x-custom-header": "value"},
16 ),
17 Proxy.all(
18 url="socks5h://abc:def@127.0.0.1:6153",
19 exclusion="google.com, facebook.com, twitter.com",
20 ),
21 ],
22 )
23
24 resp = await client.get("https://money-tourism.gr/en")
25 print("Status Code: ", resp.status_code)
26 print("Version: ", resp.version)
27 print("Response URL: ", resp.url)
28 print("Headers: ", resp.headers)
29 print("Content-Length: ", resp.content_length)
30 print("Encoding: ", resp.encoding)
31 print("Remote Address: ", resp.remote_addr)
32 text = await resp.text()
33 print("Text: ", text)
34
35
36if __name__ == "__main__":

Callers 1

client.pyFile · 0.70

Calls 3

getMethod · 0.95
ClientClass · 0.85
textMethod · 0.45

Tested by

no test coverage detected