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

Reference

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.1.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.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wzj_signin-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 fe92d011bf0bc1a4eb0dc065bb975020f2dbf33a5a9a88c716f302da50688872
MD5 45c72b7978cd7ed9d007a382f84d70a2
BLAKE2b-256 973a496227e850e8381ab31eb813194354b7ebfd2a891913a65d84c1b2f4b89b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wzj_signin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 357f1b005b85385ba1e3e9c38c2ad3d1c7584d0b565ab940ddc20bd3868bad27
MD5 0214ece7a52ab33199e63b5c71ddc44f
BLAKE2b-256 889e9ba0013884c611465a63b5b20c296a0fd80c8ef067685ce7860bcc3b021a

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