Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # import the necessary libraries
- import httpx
- import random
- # define your proxy list
- proxy_urls = [
- "http://20.210.113.32:8123",
- "http://47.56.110.204:8989",
- "http://50.174.214.216:80",
- # add more proxy URLs as needed
- ]
- # select a random proxy URL
- random_proxy = random.choice(proxy_urls)
- # make a request using the selected proxy
- with httpx.Client(proxy=random_proxy) as client:
- r = client.get("https://httpbin.io/ip")
- print(r.text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement