gjsw

国家税务总局 12366 纳税服务平台自动登录技能。支持图形验证码 OCR 识别、持久化会话、自动定位表单元素。当用户要求登录税务平台、12366、国家税务总局、国家税务局12366 、12366国家税务局 等登录场景时触发。关键判断:用户提供用户名、密码以及登录页面 URL(或已设置环境变量),希望自动完成登录流程。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "gjsw" with this command: npx skills add edwn/gjsw

国家税务总局 12366 自动登录

通过 openclaw_login.py 脚本,使用 Playwright 控制 Google Chrome 浏览器,自动填写账号、密码、识别图形验证码并提交登录。支持会话持久化(复用 Chrome 用户数据目录),下次运行可保持登录状态。

功能

  1. 自动定位表单元素 - 智能识别用户名框、密码框、验证码图片、验证码输入框和登录按钮
  2. 图形验证码 OCR - 使用 ddddocr 识别验证码(自动过滤非数字字符)
  3. 登录重试机制 - 最多重试 5 次,验证码错误会自动刷新重试,账号密码错误则立即停止
  4. 持久化会话 - 使用独立 Chrome 用户数据目录 ./chrome_profile,保存 Cookies 和登录态
  5. 远程调试端口复用 - 固定使用端口 9222,多次运行可连接同一浏览器实例
  6. 登录成功检测 - 通过 URL 跳转、页面关键词(个人中心、退出)和认证 Cookie 综合判断

前置要求

1. 安装依赖

pip install playwright ddddocr
playwright install chrome   # 安装 Playwright 浏览器内核(脚本实际使用 Chrome)

2. 安装 Google Chrome

  • Windows / macOS / Linux 均需安装 Chrome 浏览器,并确保在 PATH 中
  • 脚本会自动查找常见安装路径(如 macOS 的 /Applications/Google Chrome.app)

2. 设置环境变量(可选)

export GJSW_LOGIN_URL="https://12366.chinatax.gov.cn/login"   # Linux/macOS
# 或 Windows (CMD)
set GJSW_LOGIN_URL=https://12366.chinatax.gov.cn/login
  • 如果未设置环境变量,每次运行时必须通过 --url 参数提供登录页 URL。

使用方法

基本命令

python3 {baseDir}/openclaw_login.py <用户名> <密码> [--url <登录页URL>] [--debug] [--window-size WIDTH,HEIGHT]

参数说明

参数说明必填
用户名登录账号
密码登录密码
--url登录页面的完整 URL(未提供则读取环境变量 GJSW_LOGIN_URL)
--debug开启调试模式,打印元素定位和识别过程
--window-size浏览器窗口大小,格式 宽度,高度,默认 1280,800

示例

# 使用命令行 URL
python3 openclaw_login.py myusername mypassword --url "https://12366.chinatax.gov.cn/usercenter/login/page"

# 使用环境变量中的 URL
python3 openclaw_login.py myusername mypassword

# 调试模式 + 大窗口
python3 openclaw_login.py myusername mypassword --debug --window-size 1920,1080

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Gigo Lobster Resume

🦞 GIGO · gigo-lobster-resume: 续跑入口:v2 stable 当前会清理旧 checkpoint 并从头重跑;保留此 slug 作为旧 checkpoint 兼容入口。 Triggers: 继续试吃 / 恢复评测 / resume tasting / continue lobster...

Registry SourceRecently Updated
General

YiHui CONTEXT MODE

context-mode is an MCP server that saves 98% of your context window by sandboxing tool outputs. It routes large file reads, shell outputs, and web fetches th...

Registry SourceRecently Updated
General

xinyi-drink

Use when users ask about 新一好喝/新一咖啡 drinks, stores, menu, activities, Skill用户大礼包, today drink recommendations, afternoon tea, feeling sleepy, or personalized...

Registry SourceRecently Updated
General

vedic-destiny

吠陀命盘分析中文入口。用于完整命盘研判、命主盘 Rashi chart 与九分盘 Navamsha chart 联读、既往事件回看、出生时间稳定度判断、事业主题、婚姻主题、时空盘专题,以及基于 Jagannatha Hora PDF、星盘截图或文本命盘数据的系统拆盘。当用户提到完整星盘、事业方向、婚姻问题、关系窗...

Registry SourceRecently Updated