renzhengyu / duolingo-bot

Make the bot work so you don't have to learn a language.
10 stars 6 forks source link

Fix to work with current (2021) website #1

Closed JohnVeness closed 3 years ago

JohnVeness commented 3 years ago

Hello. Many thanks for this app. I humbly submit some changes to make it work with the current version of the website.

It seems that Duolingo obfuscated the class names so the old code no longer worked. I have tried to change to other unique IDs, although I couldn't find an alternative to "_3alTu" for when finding the correctly-matched word pairs, which looks messy.

In general, my changes are rather hacky, and I'm sure cleaner solutions could be found. For example

I would be very happy for you to incorporate these fixes, or improve them in any way!

renzhengyu commented 3 years ago

Thanks for keeping the bot up-to-date.

JohnVeness commented 3 years ago

With the narrower window, I was able to run 8 windows at the same time and see their progress. I also found the windows have to be visible for the code to work. A better fix than simply widening the window is to interpret the new drop-down menu but this is a good quick fix.

Alternatively, what about visiting https://www.duolingo.com/?isLoggingIn=true rather than trying to find and click a login button or menu option?

Or maybe even visiting the full story URL with ?isLoggingIn=true after it.