How to use proxy in Selenium Python

preview_player
Показать описание
Here i show you how to use a proxy in selenium python, so that you can scrape pages without problems.
When web scraping with python and selenium, some websites will block you after a couple dozen requests, this is where using a proxy comes handy because the website thinks that you are a different user. The best way is to rotate proxies using selenium and python, which consists of using multiple proxies, so that there is no chance of getting denied requests.

If you wish to continue learning about python selenium and web scraping, please checkout my playlist about it.
In there it teach you everything you need to know about Python selenium web scraping among other things.

Link of the code on GitHub:

Link of the background music:

Feel free to leave a like and subscribe to the channel, for more content like this.
Рекомендации по теме
Комментарии
Автор

add_to_capabilities function is not working, on white color how can i import it?

edefefeer
Автор

Tried a few tutorials for adding proxies and so far this was the only one to actually work, thank you.

UnhungSign
Автор

For using second proxy we only need to put a proxy port for second link opening or all the code ? Thanks in advance

kolakhan
Автор

how do I get my port number, IP I have fetched from website mentioned in website. please me here.

AbhishekNagmal
Автор

Can you help me?
I have value of Ip and port which is stored in variable like this
number = random.randint(0, len(z)-50)
ip_random = z[number]

How can I store it to proxy_ip_port
proxy_ip_port = 'ip_random:number' ??

murdhaniheena
Автор

executable_path has been deprecated, please pass in a Service object
this error we facing, and that didn't work

shairali
Автор

how can I change the proxy without close the window?
I want to pick the proxies randomly from a list for each iteration

nicolafavaro
Автор

thanks man big help this is way simpler than other methods!

jbezzaplays
Автор

unrecognized proxy type: MANUAL still getting this error

soonsoonmonsoon
Автор

OMG IVE BEEN LOOKING FOR SOMETHING LIKE THIS FOR

luka
Автор

Hey, Proxy (i think) has updated and the (add_to_capabilities) is not a thing anymore. can you please update the script?

aex
Автор

Thanks this is exactly what I was looking for

daviddarcy
Автор

i got 'No internet' error, whats going on?

sf
Автор

Thank you for the video.what if I want to use proxylist in a txt file to loop webdriver request, how do I do that?

k-zonegames
Автор

thanks for sharing. may i ask one thing? can i use the The reason why i chose browsermobproxy is that i want to get the network. it works?

Floyd
Автор

The code you type look like no user name and password ? So weird without that authentic how do you log in to proxy

uwutai
Автор

hi thanks for the video it was super helpful. i am having issue with no webpage opening when using the proxy as it says there's no internet but is fine when I don't use the proxy. could you please help me with this. Thanks

samsaamsiddiqui
Автор

Hello there
In which directory do we need to put the chromedriver file?

your_absolute_path'

what code to write here
Are we going to throw chrome into the project?

midomatbaaclk
Автор

showing no internet connection... plese help me fast

SushantRasal
Автор

can you make a video on proxy in scrapy??

abukaium