Streak keeper and XP farm for Duolingo. Never get demoted again!
To make it work, you need to make get an authorization token from the Duolingo web app. Simply run the following script in the browser's console while logged in:
document.cookie
.split(';')
.find(cookie => cookie.includes('jwt_token'))
.split('=')[1]
Then copy the token given and set a repository secret with the name DUOLINGO_JWT
in your GitHub Actions settings.
A static version of SESSION_PAYLOAD
in index.js
can be found using:
- While in Duolingo web app, open developer console [F12], navigate to 'Network' tab, proceed to start a lesson.
- Find the 'sessions' request, then under 'Payload' tab > 'view source'. *You might need to refresh the webpage (CTRL + R) to find the 'sessions' request.
The body for the PUT
request can be found in similar fashion.
Expect you have to complete an exercise before can find the request.
This project uses GitHub Actions scheduled workflow to keep your streak alive. The workflow can be viewed here.
Or you can use a cronjob to run this:
0 10 * * * node /path/to/index.js
This repository can also "study" lessons for you. This will give you XP so you won't get demoted never again! This workflow uses workflow_dispatch to trigger the study session. You can choose the number of lessons to be done. The workflow can be viewed here.
- This project won't help with your daily or friend quests, it can only earn XP to move up the league rank;
- This project won't do real lessons or stories, only practices, so it won't affect your learning path;