## 中文 补齐已有 owner 与已锁定上游内容可证明的许可证、技能类型和收录版本。保留 Anthropic Source Available 和其他附加条件,不把所有内容统一标为 MIT,不提升 listing-only 的安装准入。 README 保留最新的双语结构及以 manifest 为准的数量口径,增加静态目录不存访问量、下载量、评分或 Stars 的边界。 发布兼容性:**本 PR 不包含**两支团队新增的本地化字段,也不包含微信支付 `latestVersion: 1.0`;旧客户端会拒绝这些新字段,另以待发布 PR 保留,等匹配客户端发布后再合并。 验证:47 项目录校验测试、19 项 i18n 测试、5 项合集生成测试通过;完整目录/i18n/翻译新鲜度检查通过,6 个固定来源合集的生成检查通过,2 个浮动来源按既有规则明确跳过。发现并修复了生成器在 Windows 使用反斜杠造成的误报:输出改为 POSIX 路径,比较规则不放宽、不重写合集数据。 ## English Fill only license, type and listed-release facts supported by existing owners or pinned upstream content. Preserve custom license restrictions and acquisition eligibility. Keep the current bilingual README and manifest-derived inventory; do not author usage analytics. This PR deliberately excludes localized team fields and the two-part WeChat Pay version that older clients reject. Those changes remain pending a compatible client release. Validation passes: 47 catalog-validator tests, 19 i18n tests, five collection-generator tests, complete catalog and translation checks, and generated inventory checks for six pinned collections. Two mutable sources remain explicitly skipped. Fix Windows-generated path separators without weakening comparison or changing declared children.
9.6 KiB
license, name, description, version, type, risk_level, status, tags, metadata, market
| license | name | description | version | type | risk_level | status | tags | metadata | market | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MIT | creditchina-query | 信用中国企业信用信息查询——输入企业名称,自动通过图形验证码(ddddocr 本地 OCR 100ms),返回信用信息(行政处罚/失信被执行/行政许可)。Use when 用户提到"查信用"、"信用中国"、"行政处罚"、"失信企业"、"企业信用"、"失信被执行人"、"行政许可"、"creditchina"。 | 1.0.0 | procedural | high | enabled |
|
|
|
Credit China Query
L0: One-Sentence Summary
Input a company name, pass the graphic captcha automatically via Kimi WebBridge plus ddddocr local OCR, and return the enterprise's credit records.
L1: Overview
- Data source: Credit China (
creditchina.gov.cn, guided by NDRC) - Auth: graphic captcha (solved locally by ddddocr, ~100 ms)
- Invocation: Kimi WebBridge + CDP screenshot + ddddocr Python OCR
- Prerequisites:
- Kimi WebBridge daemon running
- Python with
ddddocr(pip install ddddocr) - Python with
Pillow(pip install pillow)
L2: Procedure
1. Navigate to the search page
Write C:\tmp\cc-nav.json:
{
"action": "navigate",
"args": {
"url": "https://www.creditchina.gov.cn/xinyongxinxi/?keyword={company-name-URL-encoded}&scenesVal=default&tableName=credit_xyzx_tyshxydm",
"newTab": true,
"group_title": "信用中国查询"
},
"session": "creditchina-query"
}
curl.exe -s -X POST "http://127.0.0.1:10086/command" \
-H "Content-Type: application/json" \
--data-binary "@C:\tmp\cc-nav.json" --max-time 30
Wait 6 seconds.
2. Confirm the captcha overlay
Write C:\tmp\cc-check.json:
{
"action": "evaluate",
"args": {
"code": "(function(){var v=document.getElementById('vcode');var i=document.getElementById('vcodeimg');return JSON.stringify({vcode:v?v.getBoundingClientRect().width>0:false,vimg:i?i.getBoundingClientRect().width>0:false});})()"
},
"session": "creditchina-query"
}
If vcode=true and vimg=true, the captcha overlay is visible — continue.
3. Get the captcha image coordinates
Write C:\tmp\cc-coord.json:
{
"action": "evaluate",
"args": {
"code": "(function(){var img=document.getElementById('vcodeimg');if(!img)return 'no-img';var r=img.getBoundingClientRect();return JSON.stringify({x:Math.round(r.x),y:Math.round(r.y),w:Math.round(r.width),h:Math.round(r.height),dpr:window.devicePixelRatio});})()"
},
"session": "creditchina-query"
}
Record x / y / w / h.
4. CDP screenshot of the captcha region
Note
: the WebBridge screenshot action fails intermittently on this site (HTTP 000/400) — always use CDP
Page.captureScreenshotwith the clip parameter.
Write C:\tmp\cc-shot.json (replace {x} / {y} / {w} / {h}):
{
"action": "cdp",
"args": {
"method": "Page.captureScreenshot",
"params": {
"format": "png",
"clip": { "x": {x}, "y": {y}, "width": {w}, "height": {h}, "scale": 1 }
}
},
"session": "creditchina-query"
}
curl.exe -s -X POST "http://127.0.0.1:10086/command" \
-H "Content-Type: application/json" \
--data-binary "@C:\tmp\cc-shot.json" --max-time 40 -o "C:/tmp/cc-cdp-resp.json"
Decode the base64 payload and save the image:
import json, base64
d = json.load(open(r'C:\tmp\cc-cdp-resp.json', encoding='utf-8'))
b64 = d.get('data', {}).get('data', '')
open(r'C:\tmp\cc-captcha.png', 'wb').write(base64.b64decode(b64))
5. ddddocr recognition (~100 ms)
import ddddocr, sys, time
sys.stdout.reconfigure(encoding='utf-8')
ocr = ddddocr.DdddOcr(show_ad=False)
t0 = time.time()
with open(r'C:\tmp\cc-captcha.png', 'rb') as f:
code = ocr.classification(f.read())
print(f'验证码: {code} ({(time.time()-t0)*1000:.0f}ms)')
open(r'C:\tmp\cc-code.txt', 'w').write(code)
6. Fill and submit the captcha
Write C:\tmp\cc-submit.json (replace {code}):
{
"action": "evaluate",
"args": {
"code": "(function(){var inp=document.getElementById('vcode');if(!inp)return 'no-input';var s=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,'value').set;s.call(inp,'{code}');inp.dispatchEvent(new Event('input',{bubbles:true}));inp.dispatchEvent(new Event('change',{bubbles:true}));for(var el of document.querySelectorAll('button, a, input[type=button]')){if((el.innerText||el.value||'').trim()==='验证'){el.click();break;}}return 'submitted';})()"
},
"session": "creditchina-query"
}
Wait 5 seconds.
7. Check the verification result
Write C:\tmp\cc-result.json:
{
"action": "evaluate",
"args": {
"code": "(function(){var t=document.body.innerText||'';if(t.includes('验证码错误'))return '验证码错误';if(t.includes('失效'))return '验证码已失效';return JSON.stringify({hasResult:t.includes('共')||t.includes('条'),textSample:t.slice(0,500)});})()"
},
"session": "creditchina-query"
}
Three outcomes:
"验证码错误"/"验证码已失效"→ retry from step 3 (click 换一张 to refresh)hasResult=truewith data → success, go to step 8textSamplecontains "很抱歉,没有找到您搜索的数据" → captcha passed but the keyword has no match — retry with the full name or a short name
8. Read the search results
{
"action": "evaluate",
"args": {
"code": "(function(){return document.body.innerText.slice(0,1500);})()"
},
"session": "creditchina-query"
}
9. Normalized mapping
{
"query_status": "success",
"source": "creditchina",
"company_name": "{company name}",
"captcha_solved": true,
"search_result": "有结果 | 无匹配",
"credit_info": [
{
"event_type": "行政处罚 | 行政许可 | 失信被执行 | 守信激励",
"event_title": "...",
"event_date": "...",
"source_url": "...",
"summary": "..."
}
],
"timestamp": "2026-08-31T21:00:00+08:00"
}
10. Close the session
{
"action": "close_session",
"session": "creditchina-query"
}
Retry Strategy
On captcha failure (wrong/expired), retry automatically up to 3 rounds:
- Click 换一张 to refresh the captcha via
evaluate - Wait 2 seconds for the new image
- Repeat steps 3-6 (screenshot → recognize → submit)
After 3 failed rounds: ask the user to solve the captcha manually once in the browser, then resume — once verified, the browser remembers the state and subsequent queries skip the captcha.
Known Limitations
- Very short captcha TTL: screenshot-to-submit must stay under ~15 s — use ddddocr locally (~100 ms); cloud OCR (10-30 s round trips) always times out
- CDP screenshot required: the WebBridge screenshot action fails intermittently here; use CDP
Page.captureScreenshotwith clip - Verification caching: once passed, subsequent searches (navigating to new keyword URLs) return results without another captcha
- CORS:
fetch+FileReaderorcanvas.toDataURLcannot capture the image (cross-origin taint) — CDP screenshots only - Keyword advice: exact full names may return "no data" (the database only covers entities with credit records) — try the full name first, then the short name
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
| 412 on direct HTTP | WAF blocks non-browser calls | always go through WebBridge |
| Captcha overlay missing | keyword param not triggered | check the keyword in the URL |
| Empty CDP screenshot | wrong coordinates / scrolled page | re-read vcodeimg bounding rect |
| ddddocr returns empty | broken image / recognition failure | refresh and retry; confirm screenshot bytes > 3000 |
| Wrong/expired captcha | misread / timeout | refresh (up to 3 rounds); fall back to manual |
| "没有找到您搜索的数据" | no credit records / keyword mismatch | retry with the short name |