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

Function main

python/examples/blocking/impersonate.py:5–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4
5def main():
6 client = BlockingClient(
7 impersonate=Impersonate.Firefox135,
8 user_agent="rnet",
9 )
10 with client.get("https://tls.peet.ws/api/all") as resp:
11 print("Status Code: ", resp.status_code)
12 print("Version: ", resp.version)
13 print("Response URL: ", resp.url)
14 print("Headers: ", resp.headers)
15 print("Encoding: ", resp.encoding)
16 print("Content-Length: ", resp.content_length)
17 print("Remote Address: ", resp.remote_addr)
18 print("Text: ", resp.text())
19
20
21if __name__ == "__main__":

Callers 1

impersonate.pyFile · 0.70

Calls 3

getMethod · 0.95
BlockingClientClass · 0.85
textMethod · 0.45

Tested by

no test coverage detected