Skip to content

ChaosJulien/XiaoYuanKouSuan_Auto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XiaoYuanKouSuan_Auto

用于小猿口算的基于 Python 的自动答题工具(OCR 视觉识别)

Contributors Forks Stars Issues License


📌 项目简介

“小猿口算自动答题器”

用于 小猿口算 的 Python 自动化答题工具,
基于 Tesseract OCR 文本识别 + 模拟人工输入 实现。

本项目不会修改或注入小猿口算任何程序数据,
仅通过 屏幕识别 + 自动化交互 完成操作。

本人对 B 站锁定相关技术演示视频 表示抗议
(BV1kc2NY6Ey1)

image

🔗 项目地址:
👉 https://github.com/ChaosJulien/XiaoYuanKouSuan_Auto


📚 目录


🚀 上手指南

  • 使用 BlueStacks 模拟器 运行 Android 虚拟机
  • 通过 BlueStacks 脚本管理器 录制 > < 手写输入
  • 设置为 5 倍速
  • 绑定热键:
    • .>
    • ,<

示例图:

example2

示例代码:

def draw_greater_than(origin_x, origin_y, size):
    pyautogui.press(".")

def draw_less_than(origin_x, origin_y, size):
    pyautogui.press(",")

⚙️ 开发前的配置要求

  1. Python 3.12.5
  2. Tesseract OCR(需安装中文语言包 chi_sim
  3. Windows 系统(仅支持 Windows)

📦 安装步骤

1️⃣ 安装 Python

https://www.python.org/


2️⃣ 安装 Tesseract OCR(Windows)

https://github.com/tesseract-ocr/tesseract 请确保安装 中文语言包


3️⃣ 下载脚本文件

👉 https://github.com/ChaosJulien/XiaoYuanKouSuan_Auto/blob/main/%E5%B0%8F%E7%8C%BF%E6%90%9C%E9%A2%98.py


4️⃣ 安装依赖库

清华源(推荐):

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python numpy pyautogui pytesseract keyboard

官方源:

pip install opencv-python numpy pyautogui pytesseract keyboard

5️⃣ 配置 Tesseract 路径

修改脚本第 9 行:

example3

pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"

6️⃣ 调整识别区域

根据你实际屏幕位置调整坐标:

example1


🧰 使用到的框架

  • Python
  • Tesseract OCR
  • OpenCV
  • PyAutoGUI

👤 作者

ChaosJulien 📧 [email protected]


📄 版权说明

本项目基于 MIT License 详见 LICENSE


🙏 鸣谢

  • GitHub Emoji Cheat Sheet
  • Shields.io
  • Choose an Open Source License
  • GitHub Pages

About

用于小猿口算的基于Python的自动答题工具

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages