Coder Social home page Coder Social logo

duolingo_remember's Introduction

duolingo_remember

Automatically send new words from duolingo to telegram

574_1682254791.mp4

steps

Here is the steps for bing-autogenerate method. If you use api by openAPI, just change it in github secrets.

Login duolingo.com to get jwt, open webbrowser, press F12 to call devtools, run document.cookie.match(new RegExp('(^| )jwt_token=([^;]+)'))[0].slice(11)

If you are a Chinese Mainland user who registers duolingo with your phone, you may not log in PC-end duolingo.com to get your jwt. In this case, please create a new account with your email, set the password and log in.

image-20230424204540649

Get your telegram token and chatid (please google how to)

For this step, you should first create a telegram bot, refer to this: From BotFather to 'Hello World' (telegram.org)

The time when you successfully set username for your tg bot, a token will be generated, please store it.

image-20230424204946365

You should also get your own chatid (not the bot). You should have a tg username, and you can search @RawDataBot in telegram to get your chatid.

image-20230424205224771

Change the secrets to your own, you should first fork it, and find Settings->Secrets and variables->Actions

image-20230424205537273

click “New repository secret” to add new secrets. The name of secrets should be the same to those in your yml.

Get your cookie by visiting www.bing.com, and www.cn.bing.com is also ok. You can install plugin “Cookie-Editor” first, and when visiting the page, use the plugin to generate cookies. This should be the value for “EDGE_GPT_COOKIE”. (If using openai api key, change the name and its value.)

image-20230424205709606

Change your own config file in yml

If you fork this repo run the actions, please trigger the action first (by mannual).

After triggering the action, you can run your overflow. If succeeded, your bot will send you a message.

image-20230424210354599

Run local

pip install -r requirements.txt
python duolingo.py ${duolingo_name} ${duolingo_jwt}

image

TODO

  • Support auto buy streak freeze
  • Support sentence mp3
  • Make action a little simple
  • Support Multi lauguages
  • Support send to other bots like dingding

Contribution

  • Any issues or PRs are welcome.
  • Please run black . before submitting the code.

Appreciation

Thank you, that's enough.

duolingo_remember's People

Contributors

bruce-jay avatar longfangsong avatar mrzzcn avatar yihong0618 avatar

Watchers

 avatar

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.