Skip to main content

Auto sign-in tool for TeacherMate (WeZhiJiao)

Project description

wzj-signin

Auto sign-in tool for TeacherMate (微助教)

PyPI PyPI - Python Version License: MIT

English | 中文


Features

  • Normal sign-in — fully automatic
  • GPS sign-in — auto sign-in with configured coordinates, with random jitter to avoid detection
  • QR sign-in — displays QR code in terminal for scanning
  • Email notification — sends alerts on sign-in success/failure

Installation

pip install wzj-signin

Or run directly without installing:

uvx wzj-signin

Quick Start

Environment Variables (Recommended)

OPEN_ID=xxx COURSE_ID=123 STUDENT_ID=456 wzj-signin

You can also pass the full TeacherMate URL as OPEN_ID:

OPEN_ID="https://v18.teachermate.cn/wechat-pro-ssr/?openid=xxx&from=wzj" COURSE_ID=123 uvx wzj-signin

Config File

Place a config.toml in the working directory (see config.toml.example):

[default]
openId = "xxx"
courseId = "123"
studentId = "456"
pollInterval = 10

# GPS coordinates (optional)
gps_lon = 113.999877
gps_lat = 22.595876

# Email notification (optional)
[email]
enable_send_email = false
smtp_server = "smtp.qq.com"
sender = "your@qq.com"
password = "your_smtp_password"
receiver = "notify@example.com"

Environment variables take priority over config file values.

Environment Variables

Variable Description Required
OPEN_ID TeacherMate openId or full URL
COURSE_ID Course ID
STUDENT_ID Student ID (required for QR sign-in)
POLL_INTERVAL Polling interval in seconds (default: 10)
GPS_LON GPS longitude
GPS_LAT GPS latitude
ENABLE_SEND_EMAIL Enable email notification (true / 1)
SMTP_SERVER SMTP server (default: smtp.qq.com)
EMAIL_SENDER Sender email address
EMAIL_PASSWORD SMTP authorization code
EMAIL_RECEIVER Receiver email address

Tutorial

Get OpenId
  1. Tap "All (A)" in the TeacherMate WeChat service account

    Enter TeacherMate

  2. Copy the URL from the browser address bar

    Copy link

    Get link

  3. The part after openid= in the URL is your OpenId:

    https://v18.teachermate.cn/wechat-pro-ssr/?openid=52279xxxxxxxxx81803b6cc9bb1cd24f&from=wzj
    

    You can also use the full URL as OPEN_ID directly — the program will extract it automatically.

Get Course ID
  1. Open the TeacherMate course page and launch browser DevTools (F12)

    Open course

    DevTools

  2. Find the course-related API request in the Network tab to get the courseId

    View request

    Find courseId

    courseId details

    Confirm courseId

Configure config.toml
  1. Copy the example config to your working directory:

    cp config.toml.example config.toml
    
  2. Edit config.toml with your information:

    [default]
    openId = "your OpenId"
    courseId = "your Course ID"
    studentId = "your Student ID"  # required for QR sign-in
    pollInterval = 10               # polling interval (seconds)
    
    # GPS coordinates (optional, remove if not needed)
    gps_lon = 113.999877
    gps_lat = 22.595876
    
  3. To enable email notifications, configure the [email] section:

    [email]
    enable_send_email = true
    smtp_server = "smtp.qq.com"
    sender = "your@qq.com"
    password = "your SMTP authorization code"
    receiver = "notification@example.com"
    
  4. Run:

    wzj-signin
    

Demo

After starting, the program polls for active sign-ins and handles normal, GPS, and QR sign-ins automatically:

Running

Email notification:

Email notification

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wzj_signin-0.1.0.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wzj_signin-0.1.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file wzj_signin-0.1.0.tar.gz.

File metadata

  • Download URL: wzj_signin-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.20

File hashes

Hashes for wzj_signin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 62da333d4dea3c8e925f85ff2f11e297878fec12fd5a44d3927e5dbbf95d0767
MD5 a8bb58c21acef3dbe43795286d67ac67
BLAKE2b-256 255459f6968fcb47023fac3a01c8e24a478ca46dc71ea74fd4d408cc0502629a

See more details on using hashes here.

File details

Details for the file wzj_signin-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: wzj_signin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.20

File hashes

Hashes for wzj_signin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 861446e160eec7544fe8e652cb68ea22e9f071fa19d4b8075d806c7ce41dbf15
MD5 a27a5d90b5df1f7adc7bf66d55a6a1f8
BLAKE2b-256 8284164e017ab114e50a7f899e94ba2c5d22b5bc9cf9e9cc04309515d2a90d03

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page