How to use proxy in Selenium Python

Поделиться
HTML-код
  • Опубликовано: 26 янв 2025

Комментарии • 110

  • @edefefeer
    @edefefeer Год назад +5

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

  • @UnhungSign
    @UnhungSign 3 года назад +7

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

    • @Moist_yet_Crispy
      @Moist_yet_Crispy 3 года назад

      4 sure! same

    • @AbhishekNagmal
      @AbhishekNagmal Год назад

      from where you got the port number or what port number you used?? help me please

  • @henriquelima328
    @henriquelima328 9 месяцев назад +3

    What about authenticated proxies?

  • @kolakhan3191
    @kolakhan3191 2 года назад +1

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

  • @nicolafavaro8719
    @nicolafavaro8719 3 года назад +3

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

    • @techpath3687
      @techpath3687  3 года назад

      To my knowledge you can’t. I use a rotating proxy that automatically chooses a new ip

    • @nicolafavaro8719
      @nicolafavaro8719 3 года назад

      @@techpath3687 I have to change IP without closing the window otherwise I have to run all the command until that point. Maybe there is a way to change the IP with the "os" library

    • @techpath3687
      @techpath3687  3 года назад

      I haven’t found a way yet :/ if you do find one, let me know

    • @nicolafavaro8719
      @nicolafavaro8719 3 года назад

      I am using some APIs that use an automatic rotation of IPs. This is the best solution that I have found until now

    • @techpath3687
      @techpath3687  3 года назад

      Yeah i am using the same :)

  • @Floyd0323
    @Floyd0323 2 года назад

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

  • @k-zonegames2874
    @k-zonegames2874 3 года назад +2

    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?

    • @techpath3687
      @techpath3687  3 года назад +2

      check out these two highlighted comments :)
      ruclips.net/video/nWAL65Vp9VU/видео.html&lc=Ugy6U2orHpKwOHlKR-p4AaABAg
      ruclips.net/video/nWAL65Vp9VU/видео.html&lc=Ugy6U2orHpKwOHlKR-p4AaABAg

  • @jbezzaplays
    @jbezzaplays 2 года назад

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

    • @AbhishekNagmal
      @AbhishekNagmal Год назад

      from where you got the port number or what port number you used?? help me please

  • @AbhishekNagmal
    @AbhishekNagmal Год назад

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

  • @shairali9617
    @shairali9617 2 года назад

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

  • @murdhaniheena7529
    @murdhaniheena7529 3 года назад +1

    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' ??

  • @soonsoonmonsoon6700
    @soonsoonmonsoon6700 3 года назад +1

    unrecognized proxy type: MANUAL still getting this error

  • @luka2239
    @luka2239 3 года назад

    OMG IVE BEEN LOOKING FOR SOMETHING LIKE THIS FOR EVERRRRRRR!!!

    • @AbhishekNagmal
      @AbhishekNagmal Год назад

      from where you got the port number or what port number you used?? help me please

  • @samsaamsiddiqui5001
    @samsaamsiddiqui5001 3 года назад +2

    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

    • @uraei768
      @uraei768 2 года назад +1

      1 year late but this could be caused by using free proxies

  • @a1ex718
    @a1ex718 Год назад

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

  • @redfoxie11
    @redfoxie11 Год назад

    still works bro thank u so much

  • @daviddarcy7125
    @daviddarcy7125 4 года назад +2

    Thanks this is exactly what I was looking for

    • @techpath3687
      @techpath3687  4 года назад

      You’re welcome!

    • @AbhishekNagmal
      @AbhishekNagmal Год назад

      from where you got the port number or what port number you used?? help me please

  • @sf2998
    @sf2998 3 года назад +1

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

  • @abukaium2106
    @abukaium2106 3 года назад +1

    can you make a video on proxy in scrapy??

  • @uwutai2732
    @uwutai2732 Год назад

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

  • @SushantRasal
    @SushantRasal 3 года назад

    showing no internet connection... plese help me fast

  • @ns5575-j2w
    @ns5575-j2w 3 года назад +2

    Sorry for the noob question: For the IP address in 'proxy_ip_port' are you entering your own IP address or the proxy server's IP? Thanks.

    • @Tahazif_TheCool22
      @Tahazif_TheCool22 2 года назад +3

      proxy server ip

    • @AbhishekNagmal
      @AbhishekNagmal Год назад

      @@Tahazif_TheCool22 from where you got the port number or what port number you used?? help me please

    • @AbhishekNagmal
      @AbhishekNagmal Год назад

      from where you got the port number or what port number you used?? help me please

    • @Tahazif_TheCool22
      @Tahazif_TheCool22 Год назад +2

      @@AbhishekNagmal It's been a while I'm not sure but I searched on youtube how to get free proxy addresses and ports and then tested them then tried to use in python

    • @techpath3687
      @techpath3687  Год назад

      You usually buy them. I use proxymesh. But as you Ansh said, you can find free ones.
      They work for the most part but are probably already blacklisted from big websites

  • @whatsnext2286
    @whatsnext2286 3 года назад

    Will this work with random IP address? Thanks!

  • @cachkiemtienonlinetainha
    @cachkiemtienonlinetainha 3 года назад

    Where do you get fast proxy ? I only get very slow or error when i connect

    • @techpath3687
      @techpath3687  3 года назад +1

      I pay for them. On proxymesh its 10$

    • @cachkiemtienonlinetainha
      @cachkiemtienonlinetainha 3 года назад

      @@techpath3687 ok thank you. I have a question. If i use vpn for each chrome profile (1ip/profile), is it available ?

    • @techpath3687
      @techpath3687  3 года назад

      They have automatically rotating proxies, so you can’t use a specific ip. If you need specific non changing ips, you should look for another service

  • @ManFromVenuss
    @ManFromVenuss 3 года назад

    what ide do you use?

  • @midomatbaaclk6874
    @midomatbaaclk6874 2 года назад

    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?

  • @El3frat
    @El3frat 2 года назад

    how to add proxy user and pass

  • @Hamza-tq7dh
    @Hamza-tq7dh 3 года назад

    Hi great work mon ami, where did you get the host and port from ?

    • @techpath3687
      @techpath3687  3 года назад +1

      I got it from a proxy. There are free ones out there, but i use proxymesh

    • @Hamza-tq7dh
      @Hamza-tq7dh 3 года назад

      @@techpath3687 yes that site need a paid subscription, i am looking for some free proxies and not banned by google.

    • @techpath3687
      @techpath3687  3 года назад

      Not banned by google and free is hard to find

    • @Hamza-tq7dh
      @Hamza-tq7dh 3 года назад

      @@techpath3687 hey, i have a couple questions and i would be glad if you could answear, i have purshased basic package from proxymesh, how do i use iterate through ips in selenium webdriver script so google doesnt detect me, any piece of advice will be appreciated, thanks.

    • @techpath3687
      @techpath3687  3 года назад

      Proxymesh is a automatic rotating proxies, so the proxies will be changing automatically.

  • @luiiis8430
    @luiiis8430 4 года назад +3

    Ty ma g I searched so fcking long

  • @brevflix
    @brevflix Год назад

    you speak a frenglish hahahahah , carry on bro thank you

  • @johnosana3372
    @johnosana3372 3 года назад

    how can i use multiple proxies in a txt file

    • @techpath3687
      @techpath3687  3 года назад

      you could just recreate a driver, when you want to change a proxy. So you make a function that creates a driver with a random proxy from your file and then when you want to change it, you .quit() your driver and recreate one.

    • @johnosana3372
      @johnosana3372 3 года назад

      @@techpath3687 could you help me implement this?

    • @iamkzonjames
      @iamkzonjames 3 года назад

      have you found a solution?

  • @foudiarchi7241
    @foudiarchi7241 2 года назад

    Thanks a lot, الله يعطيك الصحة

  • @shikko6489
    @shikko6489 3 года назад

    Well, you just saved my whoooole app

  • @saimon774
    @saimon774 2 года назад +1

    мне плевать что ты не знаешь русский, но спасибо тебе большое, реально твой код помог, лайк заслужил, красава

  • @relevant3329
    @relevant3329 3 года назад

    Thank you brother!

  • @leonha8463
    @leonha8463 3 года назад

    does this also work for https?

  • @tfulookinat1574
    @tfulookinat1574 3 года назад

    BAHAHAHAHAH dyslexia is kicking in tu m'as tué gros t'es un crack mdrrrr

  • @valk9819
    @valk9819 3 года назад

    It will not work if you proxy required login and password(

    • @techpath3687
      @techpath3687  3 года назад

      Check my video on proxy authentication

    • @valk9819
      @valk9819 3 года назад

      I did that but do you have a solution not using seleniumwire? Maybe mitmproxy, proxy by pip?

    • @techpath3687
      @techpath3687  3 года назад

      You may be able to whitelist your ip with your proxy provider

  • @zeus-zo8qy
    @zeus-zo8qy 3 года назад

    Amazing man thank you.....

  • @viennabartsimpson1660
    @viennabartsimpson1660 Год назад

    nice. thank you

  • @sairak3514
    @sairak3514 2 года назад

    Thanks a lot 😀

    • @AbhishekNagmal
      @AbhishekNagmal Год назад

      from where you got the port number or what port number you used?? help me please

  • @moviebeu
    @moviebeu 3 года назад

    Very good video bro.

  • @louisleschevin1054
    @louisleschevin1054 2 года назад

    OUAIS T'ES FRANCAIS MON BRO

  • @umid8378
    @umid8378 3 года назад

    Thanks a lot doode

  • @johnjhonyk8976
    @johnjhonyk8976 3 года назад

    Nice bro it's working

  • @SkySesshomaru
    @SkySesshomaru 3 года назад

    Amazing bro

  • @nimaism
    @nimaism 3 года назад

    tnx . its working

  • @mellowmails27
    @mellowmails27 3 года назад

    Is it just me having to solve hcaptchas?

    • @techpath3687
      @techpath3687  3 года назад +1

      It sometimes happens when you use bad proxies or do to much requests

  • @relevant3329
    @relevant3329 3 года назад

    So useful

  • @Base-u9w
    @Base-u9w Год назад

    This code is outdated

  • @chris2kplays
    @chris2kplays 2 года назад

    thanks

  • @stupit1679
    @stupit1679 3 года назад

    yung goat

  • @محمودخالد-ي2ت
    @محمودخالد-ي2ت 2 года назад

    test4A

  • @YFD_YT
    @YFD_YT 3 года назад

    Message: session not created: This version of ChromeDriver only supports Chrome version 93
    Current browser version is 92.0.4515.159 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

    • @Shunya383
      @Shunya383 3 года назад

      update your chrome browser

  • @daniel67324
    @daniel67324 2 года назад

    Hi mate, looks clear and promising. However I've come across "ERR_CONNECTION_RESET". Weird thing as `requests.get(url, proxies=proxies, headers=headers)` is working fine for my proxy ip