How to login automatically to any site in Python using Selenium

Поділитися
Вставка
  • Опубліковано 12 жов 2020
  • It varies for every site, because they all name elements differently. The links to the sites I used are located down below:
    Chrome driver: chromedriver.chromium.org/home
    Site 1: www.stealmylogin.com/demo.html
    Site 2: pl-coding.com/login

КОМЕНТАРІ • 73

  • @Indently
    @Indently  2 роки тому +3

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

  • @joelvarghese3370
    @joelvarghese3370 3 роки тому +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  3 роки тому

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

  • @thebzz2299
    @thebzz2299 Рік тому +2

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

  • @z2.060
    @z2.060 3 роки тому +25

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

    • @sultanhanga
      @sultanhanga 3 місяці тому

      Is it possible

    • @z2.060
      @z2.060 3 місяці тому

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

    • @OnlineEarning-ql1ls
      @OnlineEarning-ql1ls 3 місяці тому

      😂

    • @nbon5966
      @nbon5966 9 днів тому +1

      Undeteced chromedriver v2

  • @danrodrig1984
    @danrodrig1984 2 роки тому +2

    Very useful video mate. Keep growing

  • @degs2009
    @degs2009 Рік тому

    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

  • @datag1199
    @datag1199 Рік тому +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

  • @kritishah1659
    @kritishah1659 3 роки тому +1

    What is the difference between the Selenium and SelectorsHub?

  • @ansonchng6192
    @ansonchng6192 3 роки тому +2

    very good tutorial, thank you!

  • @robbpapagno210
    @robbpapagno210 Рік тому

    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.

  • @play.againn
    @play.againn 3 роки тому +15

    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  3 роки тому +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 3 місяці тому

      lol

  • @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?

  • @NaziaTabassumNatasha
    @NaziaTabassumNatasha Рік тому

    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?

  • @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 Рік тому +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?

  • @Bryant.gs.
    @Bryant.gs. Місяць тому

    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.

  • @PradyAKM
    @PradyAKM 3 місяці тому

    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

  • @Ohamskillua
    @Ohamskillua 2 роки тому +1

    Best tutorial ever !!!!!

  • @Bananen_Paul
    @Bananen_Paul Місяць тому +1

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

  • @glenn8781
    @glenn8781 2 роки тому

    thanks! this was helpful!

  • @berkaydoruk1431
    @berkaydoruk1431 2 роки тому +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 Рік тому

      Send_key not working then

  • @deepaksingh-fx1fx
    @deepaksingh-fx1fx 2 роки тому

    i want to login in multiple website , please help

  • @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.

  • @shuoma5303
    @shuoma5303 2 роки тому

    This is really awesome

  • @user-bt6ei4bv3q
    @user-bt6ei4bv3q 2 дні тому +1

    it was very helpful

  • @mohamedjamsheerk137
    @mohamedjamsheerk137 17 днів тому

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

  • @arctic_shark
    @arctic_shark 4 місяці тому

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

  • @kotarouriderblack6118
    @kotarouriderblack6118 2 роки тому +2

    very helpful

  • @fishheadset1219
    @fishheadset1219 2 роки тому

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

  • @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?

  • @andreatancio8756
    @andreatancio8756 3 роки тому +1

    very helpful :D thx

  • @maris5888
    @maris5888 2 роки тому

    Thank you a lot👍

  • @Physics69
    @Physics69 Рік тому

    How to do this on VSCode

  • @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.

  • @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

  • @arickao8143
    @arickao8143 Рік тому

    Very useful

  • @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.

  • @TengKaz
    @TengKaz Рік тому

    thank you !

  • @ancienthydra13
    @ancienthydra13 Рік тому

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

  • @rafafdez97
    @rafafdez97 Рік тому +1

    Thank you so much and #ForzaFerrari ♥

  • @sathapranik6051
    @sathapranik6051 Рік тому

    Please show me
    Login on mobile phone

  • @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

  • @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 2 роки тому

      @@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  2 роки тому

      @@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.

  • @Sebastian-cn8lh
    @Sebastian-cn8lh 3 роки тому

    google, youtube don't work x.x

  • @christophkrass6929
    @christophkrass6929 2 роки тому

    bit deprecated but very good :)

  • @popgabriel5327
    @popgabriel5327 Рік тому

    Grazzie ragazzo

  • @nareshputta8195
    @nareshputta8195 3 роки тому

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