()
| 25 | |
| 26 | |
| 27 | def 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 | |
| 52 | if __name__ == "__main__": |
no test coverage detected