Skip to content

ashawkey/autodxx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Github Actions Version of Automatic QNDXX

Instructions

  1. Clone this repository.

  2. Create github secrets (Settings --> Secrets --> New Repository secret):

    • USERNAME: your account username (phone number). Visit here to retrieve.
    • PASSWORD: your account password.
    • ORG_ID: your organization id. Visit here to retrieve.
  3. Edit .github/workflow/main.yml.

    • by default it runs at 16:50 UTC+8 on every Friday, change cron if you want to run at a different time.
  4. Enable workflow for this repository in Actions.


Automatic completion the QNDXX in Beijing

Instructions

  1. Install python , GeckoDriver, run pip3 install -r requirements.txt to install requirements.
  2. Copy config.example.yaml to config.yaml. Edit config.yaml. (Enter this website to retrieve the account and password. Get your organization id here)
  3. run python3 main.py to learn QNDXX

Details

  1. Use selenium to log in to Beijing Communist Youth League's Website to get cookies.(use dddocr to recognize the captcha)

    Get cookies with requests.

  2. Use cookies to get the newest course id. (from https://m.bjyouth.net/dxx/index)

  3. Send a request to https://m.bjyouth.net/dxx/check?id=50&org_id=172442 to finish learning.(you can visit org list to get org_id)

Multi-user support

Your config.yaml should be like this:

youth:
- username: '' 
  password: '' 
  org_id: '172442'
  message_url: '' 
  send_message_org_id: '172442'  
# user2
- username: '' 
  password: '' 
  org_id: '172442'
  message_url: '' 
  send_message_org_id: '172442'  
# user3...

TODO

  1. Use requests to login.
  2. Add Multi-user support
  3. Add mail support.

Back up plan

In general, it is always possible to go through the normal process in selenium headless mode, but the current method is feasible, so I will not continue to develop it now.

TAKE YOUR OWN RISK!!!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%