Selenium Browser Automation in Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ส.ค. 2022
  • In this video, we learn how to automate website interaction using Selenium in Python.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine.com/books/
    💻 The Algorithm Bible Book: www.neuralnine.com/books/
    👕 Programming Merch: www.neuralnine.com/shop
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine.com/
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/NeuralNine
    🎙 Discord: / discord
    🎵 Outro Music From: www.bensound.com/
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 134

  • @alex59292
    @alex59292 ปีที่แล้ว +128

    (pin this) you can use sellenium undetected driver since most websites detect normal selenium, this uses your normal chrome and not fresh private chrome

    • @okrq
      @okrq ปีที่แล้ว +4

      How do you do that

    • @coding1806
      @coding1806 ปีที่แล้ว

      @@okrq fcking go make research

    • @krishlorend.sinevasan6945
      @krishlorend.sinevasan6945 9 หลายเดือนก่อน

      how?

    • @tangoalpha1905
      @tangoalpha1905 7 หลายเดือนก่อน +4

      I have been searching around trying to find a solution for this. Someone come and bless us with the knowledge!

    • @ImTheRealCam
      @ImTheRealCam 2 หลายเดือนก่อน

      You do know it’s so easy to search pip’s for python… btw the thing you 3 have been looking for is selenium_stealth.

  • @garyhottinger7384
    @garyhottinger7384 ปีที่แล้ว +7

    Excellent! Clear and concise. I just retired and can't wait to see if I can automate some of my hobby web work.

  • @knalsgtes6684
    @knalsgtes6684 8 หลายเดือนก่อน +5

    I have search so many tutorials on selenium as reference for our automation project,, and this is the best ever tutorial.

  • @TH-nl1sb
    @TH-nl1sb ปีที่แล้ว +17

    I always had a difficult time finding the right HTML elements by myself. I wish I had known you earlier. I will continue to watch all your videos. Thank you! You are a great teacher!

  • @Delirium132231
    @Delirium132231 ปีที่แล้ว +10

    For selenium users: Action Chains is a nice discovery for those who didn't know before. Ofcource if FrontEnd developer was a nice guy

  • @lamar2658
    @lamar2658 ปีที่แล้ว +24

    Hey if you could do a video on XPATH and maybe the professional ways to load and sync tabs that would be great! Very helpful and useful video!! Going to use this for sure! Thanks

  • @imanthiu
    @imanthiu 10 หลายเดือนก่อน

    I learned a great deal from this video. It didn't help me do what I was I looking for but I always like learning new things.

  • @ibrahimib9020
    @ibrahimib9020 ปีที่แล้ว +1

    thanks man... it helped me a lot. I was starting to learn this but cannot find the right syntax to view the page. but this worked for me

  • @neatcomrade8537
    @neatcomrade8537 ปีที่แล้ว +4

    Dude! this video is exactly what i needed! thank you!

  • @heyalejandro175
    @heyalejandro175 ปีที่แล้ว +1

    So cool...thank you very much for this...Yes an XPATH video would be amazing!
    Thanks again!

  • @ghefley
    @ghefley ปีที่แล้ว

    Well done and thank you for sharing this.

  • @mr_cupcakes1808
    @mr_cupcakes1808 2 หลายเดือนก่อน

    bro's teaching is awesome
    thank you!

  • @ucxanguyen2395
    @ucxanguyen2395 ปีที่แล้ว +1

    What a great video. Super well explained, thanks! Any video in your channel on how to record yourself with soft soft? I'm under the

  • @Relderf
    @Relderf 11 หลายเดือนก่อน

    What a professional video, neat.

  • @mkhadka123
    @mkhadka123 ปีที่แล้ว

    This is nice to get a kick-off

  • @HAInett
    @HAInett 11 หลายเดือนก่อน

    that is what I needed :)))) thank you so much

  • @fakhruddindahodwala6816
    @fakhruddindahodwala6816 ปีที่แล้ว

    How were you able to format the html elements in your output terminal window? i get all the characters showing up line by line

  • @mehdismaeili3743
    @mehdismaeili3743 ปีที่แล้ว

    Excellent, thanks.

  • @JacobJavor
    @JacobJavor วันที่ผ่านมา

    Thank you, was good introduction

  • @sonerkocak5058
    @sonerkocak5058 ปีที่แล้ว +2

    Thank you! I am your fan❤️🫣!

  • @codehokage1977
    @codehokage1977 ปีที่แล้ว +3

    Question when finding the "7 in 1" button why don't you just copy the xpath off the inspector tool?

  • @pruzylo
    @pruzylo ปีที่แล้ว

    Perfect video length.

  • @soumyaranjandash3597
    @soumyaranjandash3597 8 หลายเดือนก่อน

    Thanks this is helpful 🔥

  • @DKMRFCBrlz
    @DKMRFCBrlz 4 หลายเดือนก่อน

    Amazing video!

  • @thefunnyvlogger8218
    @thefunnyvlogger8218 ปีที่แล้ว

    Please can you tell me which framework we are using here?

  • @karlybyrd1551
    @karlybyrd1551 4 หลายเดือนก่อน

    I apologize if this is a dumb question, but why would you not just search for the link you're trying to find instead of searching for the link inside the correct div? That seems like an extra unnecessary step that just led to finding the link anyway.

  • @doudline2662
    @doudline2662 6 หลายเดือนก่อน

    Thank you sir.

  • @Vibeness1
    @Vibeness1 10 หลายเดือนก่อน +1

    why use xpath to find the object names instead of e.g. EC.text_to_be_present_in_element ?

  • @petrokey
    @petrokey ปีที่แล้ว

    Hello, can you please advise on classic web scripting on python? Any resource or link..

  • @nabilpro1662
    @nabilpro1662 ปีที่แล้ว

    The best as normal ❤

  • @xxjblexx
    @xxjblexx ปีที่แล้ว

    I Hope You Do A Video On XPATH Asap... That is The Core in Selenium Library To Find And Search Elements

  • @faridalijani1578
    @faridalijani1578 ปีที่แล้ว +1

    are u running Chrome as administrator or user in ur machine? I open the browser but nothing is shown and it crashes after a while! I use conda btw

  • @amerismartin2854
    @amerismartin2854 9 หลายเดือนก่อน

    How do I make selenium open default chrome profile? Or desired chrome profile?

  • @JontheRippa
    @JontheRippa 9 หลายเดือนก่อน

    Wow thank you 👍

  • @GabrielAGilO
    @GabrielAGilO หลายเดือนก่อน

    do ahve you encounter this error before "NoSuchWindowException: Message: no such window: target window already closed
    from unknown error: web view not found" I have try to put many URLs but I keep getting the same error. i have looked only and I thought by adding the Service and Options would work but it did not, Any help

  • @jw200
    @jw200 ปีที่แล้ว

    thanks, subbed.

  • @shoki1337
    @shoki1337 ปีที่แล้ว

    Thank you

  • @freecreator6426
    @freecreator6426 2 หลายเดือนก่อน +1

    I applied one by one, but when clicking "run" it says that the module is not defined. Tried many times.

  • @sever5859
    @sever5859 ปีที่แล้ว

    Interesting video

  • @hansilsepp
    @hansilsepp 8 หลายเดือนก่อน

    Es scheint, dass es ein Problem mit dem Webdriver-Manager gibt, der versucht, eine nicht vorhandene Version des ChromeDrivers herunterzuladen. Ich habe Chrome 117.0.5938.92 gibt es da eine Lösung?

  • @hesam8845
    @hesam8845 ปีที่แล้ว

    how can I scrape google map to get contact info in specific city?

  • @jamievercetti
    @jamievercetti 8 หลายเดือนก่อน

    is there a more explanatory version of this video

  • @66abady
    @66abady ปีที่แล้ว

    thanks man. I really wanna know if we can use this method when we don't have a browser installed. lets say if I was to deploy this script on a sever.

    • @codaq4043
      @codaq4043 ปีที่แล้ว +3

      Yup, you need to make it headless and host the script on aws

  • @YourBabyPotato
    @YourBabyPotato 4 หลายเดือนก่อน

    Hi, how to capture Screenshot in this new selenium IDE? Pls help :)

  • @szwyr8380
    @szwyr8380 ปีที่แล้ว

    Why don't you just click the element to get the copy of the xpath ?, i mean u just right click on the div tag or another tag and then copy the xpath... Or it would be a better way to just read on the inspect element ???
    Because i new to this and didn't understand about this xpath things

  • @swordart802
    @swordart802 ปีที่แล้ว

    i want to use in real browser not in chormedriver how can i when i tried it doesnt get the url after browser opened

  • @RocketLR
    @RocketLR ปีที่แล้ว

    Aah wish i found this earlier.
    Had a site that needed java script render for the tables to get populated with the data..
    The online solutions did not work for some reason.. Got a bunch of chromium errors and stuff.

  • @musicarroll
    @musicarroll ปีที่แล้ว +1

    I think your selenium tutorial became an XPath tutorial.

  • @jamesmoisesllalleperez3079
    @jamesmoisesllalleperez3079 7 หลายเดือนก่อน

    y si quisiera que guarde información en la misma página?

  • @aleterra
    @aleterra 8 หลายเดือนก่อน

    is there any way to solve the captcha?

  • @ArneSchwarck
    @ArneSchwarck ปีที่แล้ว +1

    Do you know why even if detach is true the chrome window will close if a KeyboardInterrupt is sent in the Terminal window?

  • @TestSubject-ik4oq
    @TestSubject-ik4oq 2 หลายเดือนก่อน

    For the site i am trying to do i get handshake failed

  • @multigamingpro969
    @multigamingpro969 5 หลายเดือนก่อน

    Which code editor are you using?

    • @awadecoco12
      @awadecoco12 5 หลายเดือนก่อน

      pycharm

  • @humpalestine
    @humpalestine 8 หลายเดือนก่อน

    It would be better if you share the python script you are describing.

  • @dontbelasagna5968
    @dontbelasagna5968 หลายเดือนก่อน

    i can do one file code, but turning them into classes etc is my problem.. i suck at parameters and all that hmm

  • @ShahzadAli-zr4ro
    @ShahzadAli-zr4ro 10 หลายเดือนก่อน

    you are great teacher of this century on youtube
    please let me know if anything i can do for you

  • @robertharrison1601
    @robertharrison1601 ปีที่แล้ว

    As in QUORUM of NINE¿?

  • @tulasisanjay
    @tulasisanjay 6 หลายเดือนก่อน

    How can I automate the process of claiming Binance Crypto Boxes on their webpage using code extracted from Telegram?

    • @tulasisanjay
      @tulasisanjay 6 หลายเดือนก่อน

      Make video please 🙏

  • @Zhacker0927
    @Zhacker0927 9 หลายเดือนก่อน

    I got error WebElement object is not iterable > help please!

  • @user-uw5qc5vq6w
    @user-uw5qc5vq6w 3 หลายเดือนก่อน

    Which platform is that in which you are coding??

  • @qutaibabs1
    @qutaibabs1 3 หลายเดือนก่อน

    which IDE you are using ?

  • @BrickToTheHeadOfficial
    @BrickToTheHeadOfficial ปีที่แล้ว

    i installed selenium and its in my scripts folder for python and everything but i keep getting "ModuleNotFoundError: No module named 'selenium'"

    • @Vkdride
      @Vkdride 6 หลายเดือนก่อน

      i have same issue

    • @awadecoco12
      @awadecoco12 5 หลายเดือนก่อน

      its because you are dowloading it in another interpreter

  • @neatcomrade8537
    @neatcomrade8537 ปีที่แล้ว +1

    also how do i get past the captchas?

    • @tinaperry8632
      @tinaperry8632 ปีที่แล้ว

      I don't have a good answer to this. The only option I know of is to use a service that gets frelancers to solve the chptchas for you. But idk how to do that it also matters what type of captcha you get/are talking about plus since it's an arms race something that might work now might not in the future, atleast untill ai gets so powerful it can pass as a human in basically an situation if it does get to that point. The easiest capcha is the one you just click with no pictures or audio or math (yes i have seen a captcha that uses math) or anything else and it will accept or denie your request based on your browser activity and mouse movment.

  • @truealpha718
    @truealpha718 ปีที่แล้ว

    +1 subscriber____thanks a lot

  • @kwameappiahkumi5833
    @kwameappiahkumi5833 ปีที่แล้ว +1

    Does selenium work only on Google Chrome❓

    • @mkhadka123
      @mkhadka123 ปีที่แล้ว

      no it has drivers for other popular browsers as well e.g. geckodriver for firefox

  • @philtoa334
    @philtoa334 ปีที่แล้ว

    Nice_very.Nice

  • @nouhailafarajy6475
    @nouhailafarajy6475 3 หลายเดือนก่อน

    hllo can we use selenium for downold file pdf from gmail and tnx in advance

  • @adisonfryman144
    @adisonfryman144 ปีที่แล้ว +3

    OK why do you put the install in there, I just ran this code and got .....Downloading: 100%|██████████| 6.79M/6.79M [00:00

    • @adisonfryman144
      @adisonfryman144 ปีที่แล้ว +1

      also the window did notstay open

  • @sonerkocak5058
    @sonerkocak5058 ปีที่แล้ว +3

    Will there be an Instagram entry in the next video?

  • @bhasim4299
    @bhasim4299 ปีที่แล้ว +1

    Chrome driver didnt work, but firefox did. just saying

  • @aswathvanan3833
    @aswathvanan3833 ปีที่แล้ว

    make video on pupeteer

  • @waljoshamarsphost6820
    @waljoshamarsphost6820 7 หลายเดือนก่อน

    Why not simply copy the xpath of the element?

    • @browserautomate
      @browserautomate 6 หลายเดือนก่อน

      ui vision is also easy

  • @Vkdride
    @Vkdride 6 หลายเดือนก่อน

    I get attribute error: none type object has no attribute split

  • @nikolinawillette9849
    @nikolinawillette9849 ปีที่แล้ว

    I followed all the steps, but the browser still shut down 2 seconds later. What could be the problem?

  • @guilherme5094
    @guilherme5094 ปีที่แล้ว

    👍

  • @joshuaoliverantony138
    @joshuaoliverantony138 3 หลายเดือนก่อน

    ModuleNotFoundError: No module named 'webdriver_manager'

    • @browserautomate
      @browserautomate 2 หลายเดือนก่อน

      its missing lib 'webdriver_manager' so just run before pip install webdriver_manager

  • @NationalistsRuinAmerica
    @NationalistsRuinAmerica ปีที่แล้ว

    Nacho?

  • @ultraracer
    @ultraracer ปีที่แล้ว

    hi

  • @ultraracer
    @ultraracer ปีที่แล้ว

    damnn

  • @browserautomate
    @browserautomate 11 หลายเดือนก่อน

    if anyone have issue with bot detection i can solve your issue

  • @notoriousfly9260
    @notoriousfly9260 10 หลายเดือนก่อน

    13:00

  • @timothyo718
    @timothyo718 ปีที่แล้ว +1

    Was German your first language? You don’t seem to have any accent whatsoever.

  • @mohamedelhousany4960
    @mohamedelhousany4960 8 หลายเดือนก่อน

    share the script

  • @chickenrage940
    @chickenrage940 6 หลายเดือนก่อน

    doesn't work anymore.

    • @browserautomate
      @browserautomate 6 หลายเดือนก่อน

      specify your problem?

    • @chickenrage940
      @chickenrage940 6 หลายเดือนก่อน

      @@browserautomate thanks, but i worked it out. it still works, but I didn't have chrome installed. after i installed chrome, it works again.

  • @abulfazhasanov2100
    @abulfazhasanov2100 7 หลายเดือนก่อน

    Everything is ok. But why you talking like you have something in your mouth

  • @poornachanduchalla5651
    @poornachanduchalla5651 ปีที่แล้ว

    I am getting this error "Message: unknown error: cannot find Chrome binary" Could u tell me what to for this @NeurallNine

  • @firstandlast4435
    @firstandlast4435 ปีที่แล้ว +3

    I don't know. My browser just closes right after finishing script. I use
    from selenium.webdriver.chrome.options import Options
    chrome_options = Options()
    chrome_options.add_experimental_option("detach", True)
    browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options)
    but it doesn't help at all

    • @buzzark9133
      @buzzark9133 ปีที่แล้ว

      Same, and no matter what I do it always closes after whatever script i put down. If you find a solution please let me know.

    • @buzzark9133
      @buzzark9133 ปีที่แล้ว

      Hey i just found a solution, let me know if you wanna hear it

    • @firstandlast4435
      @firstandlast4435 ปีที่แล้ว

      @@buzzark9133 it'd be nice)

    • @firstandlast4435
      @firstandlast4435 ปีที่แล้ว +2

      @79_22_16 M for now i found that you can place infinite loop after code, so your script won't be finished and browser won't close, but that's definitely awful decision)

    • @buzzark9133
      @buzzark9133 ปีที่แล้ว

      @@firstandlast4435 ^ you too, check the reply above

  • @browserautomate
    @browserautomate ปีที่แล้ว

    if anyone have issue with bot detection i can solve your issue