Finish League Lecture on GitHub Open Source Project

 title=

1. Automatic group learning project

Since there are group classes every week, I often forget to do them. On weekends, the official account of the Communist Youth League will directly 502 Bad Gateway, so I thought of capturing the package and writing a small program in PHP to automatically learn the group class. The packet capture was successful. Due to my lack of theoretical knowledge, I couldn't judge what the encryption algorithm of the account password was, so I left it alone.
Until one day, I searched for relevant content on GitHub and found that some big guy made it, using Python.

Comment first then view it after your comment is approved. Join QQ Group to display all hidden texts.

This project has passed the Pull Request of the majors. From the beginning, it can only be run on the server, and later supports automatic operation using GitHub Actions. Unfortunately, after the official website of the Communist Youth League discovered this phenomenon, it blocked the corresponding IP, making the operation channel of GitHub Actions abandoned.

Comment first then view it after your comment is approved. Join QQ Group to display all hidden texts.

However, the official seems to only block the IP of GitHub, and the actual test using the server in mainland China can still run.

2, copy the project to the local

Select a directory on the server to execute:

Comment first then view it after your comment is approved. Join QQ Group to display all hidden texts.

You can copy this project to the local.

Follow the instructions in readme.md, rename config.json.bak to config.json and fill in the relevant configuration, save the file.
Example:

json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
  "username": "138...",
  "pwd": "abc...",
  "rsaKey": {
    "public": "A7E74D2B6282AEB1C5EA3C28D25660A7",
    "private": ""
  },
  "ocr": {
    "type": "baidu_image",
    "sk": "71L...",
    "ak": "iky..."
  },
  "send": {
    "type": "go_cqhttp",
    "key": "",
    "mode": "fail",
    "api_url": "https://bot...",
    "access_token": "chU...",
    "user_id": "315...",
    "group_id": "",
    "at_user": ""
  },
  "extUsers": [
    {
      "username": "181...",
      "pwd": "xyz..."
    }
  ]
}

extUsers can be empty or not configured with this parameter.

3. Test run

Type in the command line

Bash
1
2
cd ~/AutoStudyCyol/
python3 main.py

4. Configure QQ robot push

My modified version added the Go-CQHTTP message push channel.
In the configuration file, send/api_url, send/access-token, send/user_id, send/group_id, and send/at_user only need to be configured when the send/type is go_cqhttp, and fill in the robot's API interface and API interface key (optional). is empty), push to QQ account, push to group account (optional), QQ account of @ in the group (optional only when group_id is not empty).

Finish League Lecture on GitHub Open Source Project

https://blog.tsinbei.com/en/archives/83/

Author
Hsukqi Lee
Posted on

2022-01-26

Edited on

2022-07-28

Licensed under

CC BY-NC-ND 4.0

Comments

Name
Mail
Site
None yet