• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Python Python Proxy File

RandyBudGG

New Coder
Hey does anyone know how I would make a python script that uses a proxy list that the user provides to visit a website using a new proxy each time?
Thanks!
 

LTomy

King Coder
Hello!

The HTTP requests would be made by the script? Using a random proxy each time is not the hard part. I do not know any Python library, but you would have to use a Python HTTP client that supports to usage of proxies.
 

RandyBudGG

New Coder
Hello!

The HTTP requests would be made by the script? Using a random proxy each time is not the hard part. I do not know any Python library, but you would have to use a Python HTTP client that supports to usage of proxies.
Hey!
Thanks for the response. All I would want the script to do is open multiple web browsers and go to a certain url using a new proxy (using a proxy file) for each web browser
 

LTomy

King Coder
Heum, that is different if this is not the script that does the requests. That would probably be different for each Web browser. It is probably possible to configure the Web browsers so they pick random proxies by themselves. That way, you would simply have to open them with the Python script and nothing else.
I do not know how to configure Web Browsers for that. It depends on the browser used and whether your proxy provider provides addons/tools for that.

You could look into addons... With a quick search, I found that addon for Google Chrome:
https://chrome.google.com/webstore/detail/random-proxy-switcher/kdmdbahkimnclcmnppaagnnnpdjfggbb
I do not know if it is good though...
 

Antero360

King Coder
Staff Team
Security Analyst
Hey does anyone know how I would make a python script that uses a proxy list that the user provides to visit a website using a new proxy each time?
Thanks!

Hey there! I've done this on several occasions in C#. I have done this with WebRequests, WebClient, and Selenium. For python, it would be essentially the same. IF you want control over the browser interaction, I say go with Selenium.. the code for it would be as such:


from selenium import webdriver


PROXY = "11.11.11.11:1234" # IP : PORT or HOST : PORT

options = webdriver.ChromeOptions()
options.add_argument('--proxy-server=%s' % PROXY)

driver = webdriver.Chrome(
executable_path='chromedriver', options=options # The path of your downloaded webdriver here
)

browser.get('https://google.com') # Opens url in a selenium browser

( Resource: https://stackoverflow.com/questions...oute-my-web-browser-through-a-proxy-in-python )
 
Do I need to have any specific kind of proxy to be able to p write a file like this? I have been using proxies for more than two years now. However, I still don’t know how well they are compatible with different programming languages.
Now I use https://soax.com/buy-bulk-proxy because it’s the most stable and reliable proxy I use. The servers are always available, the speed is high, and I can have several sessions from one account. It’s safe to use because it provides me with residential IPs. I stopped using VPNs because they are too unstable and can be detected sometimes.
But how does it synchronize proxies with programming languages?
 

Antero360

King Coder
Staff Team
Security Analyst
Do I need to have any specific kind of proxy to be able to p write a file like this? I have been using proxies for more than two years now. However, I still don’t know how well they are compatible with different programming languages.
Now I use https://soax.com/buy-bulk-proxy because it’s the most stable and reliable proxy I use. The servers are always available, the speed is high, and I can have several sessions from one account. It’s safe to use because it provides me with residential IPs. I stopped using VPNs because they are too unstable and can be detected sometimes.
But how does it synchronize proxies with programming languages?
Better question is...why use proxies? lol
 
You asked an abstract question too much. I need to know some more details so that I can help you. However, I haven't worked with a proxy for a long time, and maybe I don't remember how to walk everything correctly on Python. But I recently started working with a service that provided me with an ip lookup api for my website. I think I will be able to ask them a few questions about your thread, and then I can give you an answer. Only it will take me a few days, my friend. But I hope I can help you, and my reply will be useful to you, my dear friend.
 
Top