drknzz / auto-lingo

A Duolingo Bot for automatic XP earning
MIT License
126 stars 40 forks source link

can't log in to duo #28

Open plytwi opened 1 year ago

plytwi commented 1 year ago

even if i have the right password and username/email(i copy-pasted it into a normal browser and it worked lke normal), it says wrong password no matter what and if i dont do -a, it closes p much as soon as i click i already have an account why does it time out anyways?

theharshnemesis commented 1 year ago

This is because the bot uses chromedriver.. and google chrome being a crap browser lets websites know you're running the webdriver(you're using automation). Chrome literally allows the website to check for that flag and block logins and this week Duolingo started doing just that(If it detects webdriver, it will simply say wrong password, no matter what).

To make the bot work again, you must use any browser, that does not tell websites, what's none of their business(such as which extensions you run). One such browsers is firefox.

Selenium works just fine on firefox, you install extension and put the geckodriver.exe in the folder... but the script needs to be adjusted to work with geckodriver.exe. I have tried simply renaming it to chromedriver.exe, but still wont work.. it's not that easy.

Another possible way that might work, is to try to bypass the need to login with the bot, If you somehow inject the session cookie to that clean chrome instance that the webdriver is using. If duolingo doesn't boot you out for using selenium, which it can detect now(it very likely they did a halfassed job) then we can continue using chrome.

drknzz commented 1 year ago

So it seems that Duolingo changed something recently regarding automated tools in browsers. I tried to fix it by using both Firefox browser and undetected_chromedriver. Sadly, neither resulted in a success so far.

plytwi commented 1 year ago

hm. weird

vladlemos commented 1 year ago
chrome_options.add_argument('--disable-blink-features=AutomationControlled')
chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"])
chrome_options.add_experimental_option('useAutomationExtension', False)

It Works with gmail password; But the learn mode is not working;

kinhadthu commented 1 year ago
chrome_options.add_argument('--disable-blink-features=AutomationControlled')
chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"])
chrome_options.add_experimental_option('useAutomationExtension', False)

It Works with gmail password; But the learn mode is not working;

Excuse me but... where can I put those 3 sentences ?