Git Product home page Git Product logo

auto-lingo's Introduction

Auto-lingo

A Duolingo Bot for automatic XP earning.

Auto-lingo works in both the Learn mode and the Stories mode.

Built with Python and Selenium.

Modes

Learn mode

Completes every available skill until it is fully leveled up.

learn

Stories mode

Completes every available story as long as it gives XP.

stories

Getting Started

Prerequisites

You will need Python, Selenium, Chrome and Chromedriver installed.

Installing Selenium

pip install selenium

Installing Chromedriver

  1. Check your version of Chrome by going here and following the 3 steps in "How to check your version of Chrome".
  2. Go here and download the right version of chromedriver.
  3. Place the downloaded chromedriver executable in default path given in settings.json under "chromedriver_path"
    OR
    change the path in settings.json to point to the chromedriver executable.

Installation

  1. Download the ZIP file or clone the repository
git clone https://github.com/drknzz/auto-lingo.git
  1. Make sure the path to chromedriver executable is correctly set in settings.json
"chromedriver_path": "C:\\Program Files (x86)\\chromedriver.exe"
  1. (Optional) Save both your login / mail and password to Duolingo in credentials.json
"login": "[email protected]",
"password": "example"

Usage

python auto-lingo.py

Additional flags

Syntax Description
-s or --stories Stories mode
-l or --learn Learn mode
-i or --incognito Start browser in incognito mode
-m or --mute Start browser with muted audio
-a or --autologin Automatically login using credentials.json

Settings

Settings are located in settings.json file.

Syntax Description
chromedriver_path Path to chromedriver executable
antifarm_sleep Sleep time inbetween completing stories / skills
deviation Deviation of antifarm_sleep time for harder bot detection
maximize_window Start browser in full screen
headless No browser gui required
incognito No browser gui required
auto_login Automatically login to Duolingo using data in credentials.json
mute_audio Start browser with muted audio

Acknowledgments

Huge thanks to Kubvv for countless tests which led to bug and corner case finds.

License

Auto-lingo is distributed under the MIT License.

auto-lingo's People

Contributors

drknzz avatar findarato avatar krymancer avatar kubvv avatar pp-ft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

auto-lingo's Issues

Not working today

Today I run it, but the chrome just disappeared without giving any error messages. Tried on Windows 10 and BigSur 11.5.2


can't log in to duo

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?

got an unexpected keyword argument 'service'

Hello
I can't get the auto-lingo.py to launch/run.

When i type from Windows command prompt python auto-lingo.py, i receive this message please see screen capture

My configuration:
Platform : windows 10
Python : v 3.6.3
Chrome : 107.0.5304.63
Chromedriver : 107.0.5304.62

Is there something i m doing wrong.

Please advice, thank you.

Is it banable?

Can you get banned using an xp bot?
I really dont wanna lose my account

Learn Mode broken

When trying to use the learn mode it will open a lesson but then not do anything. The script still seems to work partially because when you manually try to input solutions it will auto confirm almost instantly. Stories mode works fine.

Login error

Unable to login through script since last few days. No issue in normal manual login. Tried disabling blink features, but no success:
chrome_options.add_argument('--disable-blink-features=AutomationControlled')

login-error

find_element_by_tag_name is deprecated

Please use find_element(by=By.TAG_NAME, value=name) instead

getting this when using learn mode,
however, replacing it does nothing and closes the chrome window after a few seconds

Help

I'm lost. I been trying to figure this out for weeks. How the heck do I get it to run lesson mode. I tried just commenting out the flag in the code to make it set lessons to true, but then it errored out. I think it might be a bug on the lessons because it would open the lessons, but not start the lesson. I looked at all the documentation, but none of it helps. I tried the "usage" command, but it gets me no where. No matter where I type it in. I'm on windows 10.
`
Python 3.9.6
Type "help", "copyright", "credits" or "license" for more information.

$ python auto-lingo.py
File "", line 1
$ python auto-lingo.py
^
SyntaxError: invalid syntax

`

I'd just like to complete some of the lessons. So that I can get more stories :)!

Issues bot in Learn Mode

The bot doesn't work in Learn mode, I'm using bot to earn German lesson xp. Help me!
P/S: Bot still works with story mode
image

How to run on linux?

Hello, I'm trying to get this to run on my linux machine.

Traceback (most recent call last):
  File "/home/****/.local/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 72, in start
    self.process = subprocess.Popen(cmd, env=self.env,
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'C:\\Program Files (x86)\\chromedriver.exe'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/****/Documents/Programming/python/auto-lingo/auto-lingo.py", line 796, in <module>
    main()
  File "/home/****/Documents/Programming/python/auto-lingo/auto-lingo.py", line 773, in main
    driver = webdriver.Chrome(settings['chromedriver_path'], options=chrome_options)
  File "/home/****/.local/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
    self.service.start()
  File "/home/****/.local/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 86, in start
    raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'C:\Program Files (x86)\chromedriver.exe' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

๐Ÿ˜„ Much thanks!

Learn Mode

Just tried installing and running the bot which all worked fine but if I choose the Learn Mode it opens the right page but cannot start a module and just returns a TimeoutException after a while.
Is there any way to get this updated and working again?

Can't import settings?

C:\Users\dummy\Desktop\auto-lingo-main>python auto-lingo.py -l
๐Ÿ Starting out
Failed to import settings from settings.json.

C:\Users\dummy\Desktop\auto-lingo-main>

hopefully you can tell me what im doing wronge here

Project dead?

People have been having login issues and so do I and there aren't any updates. When I try to sign in with Google, it won't allow me to

New Duolingo Stories feature added for French makes it HANG

Hello,

For learning French from English, the stories have a new feature.
This new feature appears only after the 40-50th story.
At the 'end' of a story, you get a question if you want to try to write a summary for extra 10xp.

This new feature makes the bot hang/stop.

Should be easy to fix this, when this question arise, just press Skip Exercise.
I can make a PR if you want me to.

Screenshot 2022-02-07 at 14 29 36

Screenshot 2022-02-07 at 14 34 29

Getting traceback error after logging in

After i login nothing happens and after a few seconds it throws this error:

Loggin in
Traceback (most recent call last):
  File "D:\Local Downloads\auto-lingo\auto-lingo.py", line 911, in <module>
    main()
  File "D:\Local Downloads\auto-lingo\auto-lingo.py", line 903, in main
    learn_bot()
  File "D:\Local Downloads\auto-lingo\auto-lingo.py", line 778, in learn_bot
    skills = WebDriverWait(driver, 20).until(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\selenium\webdriver\support\wait.py", line 95, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:

Crashing

About a week ago the system just started crashing. I open it. It opens the command prompt says dev tools listening, opens chrome, chrome crashes, then the prompt closes. I noticed some GUI changes in the mobile app. Maybe that broke it?

Can not use learn mode

I can only use stories mode, can not use learn mode, I don't know why. Please help me
Screen Shot 2022-06-10 at 00 42 36

Program crashes and give this error.

It starts off okay, but when I try to login, it crashes. gives this error.
auto-lingo.py:734: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
driver = webdriver.Chrome(settings['chromedriver_path'], options=chrome_options)
help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.