neothematrix / noip-renew

Auto renew (confirm) noip.com free hosts
https://hub.docker.com/r/moebiuss/noip-renew
Apache License 2.0
54 stars 20 forks source link

Update noip-renew.py #6

Closed Angel0ffDeath closed 2 years ago

Angel0ffDeath commented 2 years ago

@neothematrix Login - Tested and works. This way you don't need to find Log In button - something which currently works, but may stop working if web site changes. We just send ENTER to password field and it hits loin button :)

neothematrix commented 2 years ago

mmm are you sure it's working? I've tested it and I get a "419 page expired" after the script clicks the button with your patch? perhaps something else is missing?

Angel0ffDeath commented 2 years ago

Tested again and I confirm it works. Did you commented this line self.browser.find_element(By.XPATH, "//form[@id='clogs']/button[@type='submit']").click()

Because after sending enter you cannot find the button....

Angel0ffDeath commented 2 years ago

If it doesnt work - probably then some different behavior of the system - Im using RPi4 with debian buster, python is 3.6.3; selenium and chrome - what script installed

Angel0ffDeath commented 2 years ago

Can somebody else (except neothematrix) test this approach and share the results?

neothematrix commented 2 years ago

let's tag some of our contributors to catch their attention: @benyjr @peteakalad I was trying to update my docker image and test it on a test noip.com account (to avoid getting banned) but for some reason my new account doesn't have expiration days next to the newly created hostname, maybe it appears after some time?

Angel0ffDeath commented 2 years ago

Can't remember, but I think after you have new account and register host - it will expire after 30 days.... But since here the purpose is to test Login only and not confirmation - you can comment the part of the code which opens host confirmation web site

neothematrix commented 2 years ago

it appeared now, not sure if because some time has passed or because I performed a real update using the noip update client. anyway, I'll test your change asap :)

Angel0ffDeath commented 2 years ago

1 more thing NOIP site does not allow 2 connections per user, i.e. if you are logged in into your browser, login from the script will always fail... Or at least by me fails always

Angel0ffDeath commented 2 years ago

@neothematrix It seems finally worked by you :) Thank you :) 👍

neothematrix commented 2 years ago

yup, not sure what was the problem, but it seems it was related to multiple login, probably as you mentioned, I was logged in with my browser and also trying to run the script. Anyways, thank you for the PR!