No video

How to login automatically to any site in Python using Selenium

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

Пікірлер: 74

  • @Indently
    @Indently2 жыл бұрын

    Looking for more good Python content? Check out: kzread.info/dron/TNyF3KFTXmME0byuTRwfZA.html

  • @thebzz2299
    @thebzz2299 Жыл бұрын

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

  • @joelvarghese3370
    @joelvarghese33703 жыл бұрын

    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 :)

  • @RohitKumar-sn4mg

    @RohitKumar-sn4mg

    4 күн бұрын

    ​@@Indentlywithout browser possible or not?

  • @danrodrig1984
    @danrodrig19842 жыл бұрын

    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

  • @ansonchng6192
    @ansonchng61923 жыл бұрын

    very good tutorial, thank you!

  • @z2.060
    @z2.0603 жыл бұрын

    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

    16 күн бұрын

    Undeteced chromedriver v2

  • @play.againn
    @play.againn3 жыл бұрын

    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 жыл бұрын

    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

  • @datag1199
    @datag1199 Жыл бұрын

    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
    @kritishah16593 жыл бұрын

    What is the difference between the Selenium and SelectorsHub?

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

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

  • @RTZ04
    @RTZ043 жыл бұрын

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

  • @Ohamskillua
    @Ohamskillua2 жыл бұрын

    Best tutorial ever !!!!!

  • @gaganmalik9557
    @gaganmalik95572 жыл бұрын

    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.

  • @glenn8781
    @glenn87812 жыл бұрын

    thanks! this was helpful!

  • @kotarouriderblack6118
    @kotarouriderblack61183 жыл бұрын

    very helpful

  • @Bananen_Paul
    @Bananen_Paul2 ай бұрын

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

  • @shuoma5303
    @shuoma53032 жыл бұрын

    This is really awesome

  • @surajoberai
    @surajoberai Жыл бұрын

    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

    6 ай бұрын

    did u figure it out?

  • @Bryant.gs.
    @Bryant.gs.2 ай бұрын

    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.

  • @lufius
    @lufius Жыл бұрын

    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?

  • @user-bt6ei4bv3q
    @user-bt6ei4bv3q10 күн бұрын

    it was very helpful

  • @maris5888
    @maris58882 жыл бұрын

    Thank you a lot👍

  • @andreatancio8756
    @andreatancio87563 жыл бұрын

    very helpful :D thx

  • @deepaksingh-fx1fx
    @deepaksingh-fx1fx2 жыл бұрын

    i want to login in multiple website , please help

  • @PradyAKM
    @PradyAKM3 ай бұрын

    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

  • @arickao8143
    @arickao8143 Жыл бұрын

    Very useful

  • @arctic_shark
    @arctic_shark4 ай бұрын

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

  • @mohamedjamsheerk137
    @mohamedjamsheerk13725 күн бұрын

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

  • @fishheadset1219
    @fishheadset12192 жыл бұрын

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

  • @Indently

    @Indently

    2 жыл бұрын

    PyCharm

  • @berkaydoruk1431
    @berkaydoruk14312 жыл бұрын

    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

  • @TengKaz
    @TengKaz Жыл бұрын

    thank you !

  • @Physics69
    @Physics69 Жыл бұрын

    How to do this on VSCode

  • @danielmanea5741
    @danielmanea57413 жыл бұрын

    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

  • @dnyanesh.15
    @dnyanesh.152 жыл бұрын

    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.

  • @ancienthydra13
    @ancienthydra13 Жыл бұрын

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

  • @Indently

    @Indently

    Жыл бұрын

    PyCharm

  • @sathapranik6051
    @sathapranik6051 Жыл бұрын

    Please show me Login on mobile phone

  • @rafafdez97
    @rafafdez97 Жыл бұрын

    Thank you so much and #ForzaFerrari ♥

  • @electricz3045
    @electricz30453 жыл бұрын

    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.

  • @Sebastian-cn8lh
    @Sebastian-cn8lh3 жыл бұрын

    google, youtube don't work x.x

  • @christophkrass6929
    @christophkrass69292 жыл бұрын

    bit deprecated but very good :)

  • @DoATreFlip
    @DoATreFlip2 жыл бұрын

    how do I login to multiple accounts

  • @Indently

    @Indently

    2 жыл бұрын

    You can use Selenium

  • @DoATreFlip

    @DoATreFlip

    2 жыл бұрын

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

  • @popgabriel5327
    @popgabriel5327 Жыл бұрын

    Grazzie ragazzo

  • @nareshputta8195
    @nareshputta81953 жыл бұрын

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

  • @mariaalejandracettour9028
    @mariaalejandracettour90283 жыл бұрын

    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.