How to login automatically to any site in Python using Selenium

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ม.ค. 2025

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

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

    Looking for more good Python content? Check out: th-cam.com/channels/TNyF3KFTXmME0byuTRwfZA.html

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

    Really love your work Federico. Hope you continue to make these really good videos. I also love the fact that you make videos on things that you feel are good rather that focusing on some niche area like android dev. I really like the variety of content. Thanks a lot

    • @Indently
      @Indently  4 ปีที่แล้ว

      Really glad to hear that! Thanks for the support :)

    • @RohitKumar-sn4mg
      @RohitKumar-sn4mg 5 หลายเดือนก่อน

      ​@@Indentlywithout browser possible or not?

  • @play.againn
    @play.againn 4 ปีที่แล้ว +17

    You wrote Hello World! 4 days ago and now you writing Selenium. I think the next video will be about ML. Thank You!

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

      Really happy you enjoyed! I'm really looking forward to bringing a lot with Python, of course I will also continue the learning python series, but I can't wait for the ML!

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

      lol

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

    This was an excellent demonstration on how to use this particular application. Thank you so much

  • @z2.060
    @z2.060 3 ปีที่แล้ว +28

    How to make Google Chrome dont know that the browser is controlled by a software ?

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

      Is it possible

    • @z2.060
      @z2.060 9 หลายเดือนก่อน

      @@sultanhanga I think so lol, literally forgot about it. It's been 3 years :)

    • @OnlineEarning-ql1ls
      @OnlineEarning-ql1ls 8 หลายเดือนก่อน

      😂

    • @nbon5966
      @nbon5966 5 หลายเดือนก่อน +2

      Undeteced chromedriver v2

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

    Thanks this really helped, I managed to easily automate a regular download of files from website and then made headless and ran from cron. Many Thanks

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

    Very useful video mate. Keep growing

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

    Thanks for the video. Is it possible to run the login without opening the browser? My use case is logging in, downloading a file and landing it on my local directory (using import OS and requests). I believe we can use the "headless" argument for Chrome but wondering if that is the only solution (or headless just a hack). I know we can run the action silently using BeautifulSoup. Just learning Selenium here. Thanks

  • @Bananen_Paul
    @Bananen_Paul 7 หลายเดือนก่อน +1

    How can I tell my Linux based system that it should run this python script every 24h ?

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

    can we do like if we give credentials it will automatically send to the homepage or profile without explicitly writing the URL in the code, like happens in web browser

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

    thank you for the video. just one question : could you suggest me some ideas about how to automate running python file at a particular time let's say 8:00 in the morning?

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

      did u figure it out?

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

    I am getting the below error. Not able to open the url in first place :(
    ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

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

    hi, I am using javascript and i dont have the id eather, do you maybe know how it works with javascript?

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

    Hey thank you for the video!
    Just a quick note,
    driver.find_element(By.NAME, "name").send_keys(var) ---> it became like this in the new selenium
    driver.find_element(By.NAME, "password").send_keys(var)
    driver.find_element(By.CSS_SELECTOR, 'input[type="submit" i]').click()

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

      your comment got mine going, except for the button click. is there something I could be doing wrong?

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

      i receive this
      raise exception_class(message, screen, stacktrace)
      selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: input[type="submit" i]
      Stacktrace:
      RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
      WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:180:5
      NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:392:5
      element.find/

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

      @@jameswhite7637
      It just says that it's not able to locate the button element, so try to select it by something else maybe or check other ways to select the elements?

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

    What is the difference between the Selenium and SelectorsHub?

  • @Bryant.gs.
    @Bryant.gs. 7 หลายเดือนก่อน

    Greetings, I would like to know how I can do autologin in Python, it is to do it from a program that runs on Windows.

  • @robbpapagno210
    @robbpapagno210 2 ปีที่แล้ว

    is there a way to run this on Google cloud Platform? I would guess that we just need to reference Selenium in a bit of a different way.

  • @NaziaTabassumNatasha
    @NaziaTabassumNatasha 2 ปีที่แล้ว

    I want to test a website which is written in PHP, will it be an issue if I test it using python like you did in the video?

  • @gaganmalik9557
    @gaganmalik9557 2 ปีที่แล้ว

    thanks bro you helped me today
    one thing try except can you teach with the scraping part its needed to never make process get stopped.

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

    i cannot see find element by id or name in drop down list

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

    very good tutorial, thank you!

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

    why can't I get it to work... It's not auto filling the inputs

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

    For name part you are using element_by_name but what if that name string is a 2 word string with a space like "string name" how can we write that after "by_"

    • @lcoin4891
      @lcoin4891 2 ปีที่แล้ว

      driver.find.element(By.name, "name_here")

    • @abhaydeep205
      @abhaydeep205 2 ปีที่แล้ว

      Send_key not working then

  • @dnyanesh.15
    @dnyanesh.15 2 ปีที่แล้ว

    I am getting an error “chromedriver 2” can’t be opened because Apple cannot check it for malicious software.

    • @Indently
      @Indently  2 ปีที่แล้ว

      This is because Apple cannot check it for malicious software.

  • @fishheadset1219
    @fishheadset1219 3 ปีที่แล้ว

    what is this interface called ?
    when i download python i only get a cmd like comand window

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

      PyCharm

  • @deepaksingh-fx1fx
    @deepaksingh-fx1fx 2 ปีที่แล้ว

    i want to login in multiple website , please help

  • @danielmanea5741
    @danielmanea5741 3 ปีที่แล้ว

    I don't know if you are going to see this, great vid by the way. I'm just getting started with selenium and I have encountered a problem. When I do these steps, the google login screen/youtube login screen appears and i don't know to get rid of that. It pops up and doesn't register any of my commands.

    • @Indently
      @Indently  3 ปีที่แล้ว

      Hi Daniel, you're going to have to create some additional commands in Python to take care of that.

    • @danielmanea5741
      @danielmanea5741 3 ปีที่แล้ว

      @@Indently i understand. The idea is that I don't even know what to search or how should the code look for that sign up screen to disappear:)

    • @Indently
      @Indently  3 ปีที่แล้ว

      www.google.com/search?client=firefox-b-d&q=selenium+google+popup

  • @Physics69
    @Physics69 2 ปีที่แล้ว

    How to do this on VSCode

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

    Best tutorial ever !!!!!

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

    Bro what is the app you are using when coding python?

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

    run your program 50 times in a row, and see that all computer resources are occupied

  • @electricz3045
    @electricz3045 3 ปีที่แล้ว

    How i can let the script automatically complete hcapcha?

    • @Indently
      @Indently  3 ปีที่แล้ว

      It's simple, you just need to make it click on the right answers and make it click on "I'm not a robot".

    • @electricz3045
      @electricz3045 3 ปีที่แล้ว

      @@Indently Images shown are random each time so i need to implement a solvingapi like the one from capmonster but idk how to do it.

  • @sathapranik6051
    @sathapranik6051 2 ปีที่แล้ว

    Please show me
    Login on mobile phone

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

    what if there is a captcha

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

      You can use a headless browser interface with some code, look it up

  • @DoATreFlip
    @DoATreFlip 2 ปีที่แล้ว

    how do I login to multiple accounts

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

      You can use Selenium

    • @DoATreFlip
      @DoATreFlip 2 ปีที่แล้ว

      @@Indently thanks for the reply can you make video of please aim on my knees

  • @Sebastian-cn8lh
    @Sebastian-cn8lh 3 ปีที่แล้ว

    google, youtube don't work x.x

  • @ShrutiJadhav-n2z
    @ShrutiJadhav-n2z 5 หลายเดือนก่อน +1

    it was very helpful

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

    You sound like David. ^ ^

  • @mariaalejandracettour9028
    @mariaalejandracettour9028 3 ปีที่แล้ว

    good my problem is that in the web to which I want to access ... it has 3 buttons before being able to loggear.
    1st button (login)
    2do button (select facebook or gmail)
    load my data
    3rd button send data
    How do I click on the previous buttons to get to the registration form?

    • @Indently
      @Indently  3 ปีที่แล้ว

      Hey Maria, I don't recommend this for either Google or Facebook, they will eventually ban your account if you insist on using this for that.

    • @joeschmoe435
      @joeschmoe435 3 ปีที่แล้ว

      @@Indently Is there an alternative that you would recommend for platforms like that? Something that is not visible as automation software to the web sites

    • @Indently
      @Indently  3 ปีที่แล้ว

      @@joeschmoe435 I mean unless you are working with their official apis, I suggest you just use the "remember username & password fields".
      These companies are very strict, and I personally wouldn't dare to do any tests on them without expecting my account to be banned.

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

    very helpful

  • @nareshputta8195
    @nareshputta8195 3 ปีที่แล้ว

    Nice vedio but we have timer 20 sec before login how we will create program

  • @glenn8781
    @glenn8781 2 ปีที่แล้ว

    thanks! this was helpful!

  • @christophkrass6929
    @christophkrass6929 3 ปีที่แล้ว

    bit deprecated but very good :)

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

    Thank you so much and #ForzaFerrari ♥

  • @shuoma5303
    @shuoma5303 3 ปีที่แล้ว

    This is really awesome

  • @maris5888
    @maris5888 2 ปีที่แล้ว

    Thank you a lot👍

  • @Nidhi_Dodiya1014
    @Nidhi_Dodiya1014 11 วันที่ผ่านมา

    thanks a lot! 💖💖

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

    thank you !

  • @arickao8143
    @arickao8143 2 ปีที่แล้ว

    Very useful

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

    very helpful :D thx

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

    Grazzie ragazzo