Chinese-Geo 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chinese_geo-0.1.1/Chinese_Geo.egg-info/PKG-INFO +114 -0
- chinese_geo-0.1.1/Chinese_Geo.egg-info/SOURCES.txt +65 -0
- chinese_geo-0.1.1/Chinese_Geo.egg-info/dependency_links.txt +1 -0
- chinese_geo-0.1.1/Chinese_Geo.egg-info/entry_points.txt +3 -0
- chinese_geo-0.1.1/Chinese_Geo.egg-info/requires.txt +9 -0
- chinese_geo-0.1.1/Chinese_Geo.egg-info/top_level.txt +1 -0
- chinese_geo-0.1.1/LICENSE +21 -0
- chinese_geo-0.1.1/PKG-INFO +114 -0
- chinese_geo-0.1.1/README.md +94 -0
- chinese_geo-0.1.1/pyproject.toml +31 -0
- chinese_geo-0.1.1/seogeo/__init__.py +1 -0
- chinese_geo-0.1.1/seogeo/botverify.py +56 -0
- chinese_geo-0.1.1/seogeo/cli.py +249 -0
- chinese_geo-0.1.1/seogeo/data/__init__.py +0 -0
- chinese_geo-0.1.1/seogeo/data/domestic_bots.py +23 -0
- chinese_geo-0.1.1/seogeo/data/overseas_bots.py +21 -0
- chinese_geo-0.1.1/seogeo/data/platforms.py +53 -0
- chinese_geo-0.1.1/seogeo/dom.py +89 -0
- chinese_geo-0.1.1/seogeo/engines.py +79 -0
- chinese_geo-0.1.1/seogeo/fetch.py +64 -0
- chinese_geo-0.1.1/seogeo/generate.py +198 -0
- chinese_geo-0.1.1/seogeo/mcp_server.py +98 -0
- chinese_geo-0.1.1/seogeo/monitor.py +101 -0
- chinese_geo-0.1.1/seogeo/offsite.py +31 -0
- chinese_geo-0.1.1/seogeo/pipeline.py +35 -0
- chinese_geo-0.1.1/seogeo/report.py +117 -0
- chinese_geo-0.1.1/seogeo/robots.py +102 -0
- chinese_geo-0.1.1/seogeo/rules/__init__.py +18 -0
- chinese_geo-0.1.1/seogeo/rules/base.py +80 -0
- chinese_geo-0.1.1/seogeo/rules/bytespider.py +37 -0
- chinese_geo-0.1.1/seogeo/rules/content.py +42 -0
- chinese_geo-0.1.1/seogeo/rules/discovery.py +27 -0
- chinese_geo-0.1.1/seogeo/rules/domestic_bots.py +58 -0
- chinese_geo-0.1.1/seogeo/rules/freshness.py +23 -0
- chinese_geo-0.1.1/seogeo/rules/https.py +17 -0
- chinese_geo-0.1.1/seogeo/rules/opengraph.py +24 -0
- chinese_geo-0.1.1/seogeo/rules/overseas_bots.py +46 -0
- chinese_geo-0.1.1/seogeo/rules/rendering.py +39 -0
- chinese_geo-0.1.1/seogeo/rules/structure.py +41 -0
- chinese_geo-0.1.1/seogeo/rules/technical.py +18 -0
- chinese_geo-0.1.1/seogeo/rules/viewport.py +18 -0
- chinese_geo-0.1.1/seogeo/scoring.py +43 -0
- chinese_geo-0.1.1/seogeo/service.py +51 -0
- chinese_geo-0.1.1/setup.cfg +4 -0
- chinese_geo-0.1.1/tests/test_botverify.py +61 -0
- chinese_geo-0.1.1/tests/test_bytespider.py +36 -0
- chinese_geo-0.1.1/tests/test_content.py +34 -0
- chinese_geo-0.1.1/tests/test_discovery.py +32 -0
- chinese_geo-0.1.1/tests/test_dom.py +55 -0
- chinese_geo-0.1.1/tests/test_domestic_bots.py +61 -0
- chinese_geo-0.1.1/tests/test_engines.py +75 -0
- chinese_geo-0.1.1/tests/test_fetch.py +45 -0
- chinese_geo-0.1.1/tests/test_generate.py +176 -0
- chinese_geo-0.1.1/tests/test_meta_rules.py +59 -0
- chinese_geo-0.1.1/tests/test_monitor.py +63 -0
- chinese_geo-0.1.1/tests/test_offsite.py +67 -0
- chinese_geo-0.1.1/tests/test_overseas_bots.py +42 -0
- chinese_geo-0.1.1/tests/test_packaging.py +40 -0
- chinese_geo-0.1.1/tests/test_pipeline.py +70 -0
- chinese_geo-0.1.1/tests/test_registry.py +56 -0
- chinese_geo-0.1.1/tests/test_rendering.py +27 -0
- chinese_geo-0.1.1/tests/test_report.py +92 -0
- chinese_geo-0.1.1/tests/test_robots.py +93 -0
- chinese_geo-0.1.1/tests/test_scoring.py +46 -0
- chinese_geo-0.1.1/tests/test_skills.py +48 -0
- chinese_geo-0.1.1/tests/test_structure.py +28 -0
- chinese_geo-0.1.1/tests/test_technical.py +22 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: Chinese-Geo
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: 中文 / 国内生态优先的开源 SEO + GEO 工具包(让站点被国内 AI 引擎抓取与引用)
|
|
5
|
+
Author: qingqingpi
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/qingqingpi/Chinese-Geo
|
|
8
|
+
Project-URL: Repository, https://github.com/qingqingpi/Chinese-Geo
|
|
9
|
+
Project-URL: Issues, https://github.com/qingqingpi/Chinese-Geo/issues
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Provides-Extra: render
|
|
14
|
+
Requires-Dist: playwright>=1.40; extra == "render"
|
|
15
|
+
Provides-Extra: mcp
|
|
16
|
+
Requires-Dist: mcp>=1.0; extra == "mcp"
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# Chinese-Geo
|
|
22
|
+
|
|
23
|
+
> 中文 / 国内生态优先的开源 **SEO + GEO(生成式引擎优化)** 工具包。
|
|
24
|
+
> 让你的网站被**豆包 / DeepSeek / 文心一言 / 通义千问 / 腾讯元宝 / Kimi** 等国内 AI 引擎**抓得到、看得懂、愿意引用**。
|
|
25
|
+
> **国内生态是差异化核心,海外主流(ChatGPT / Claude / Perplexity / Google AI)一并覆盖——两个生态,一个工具。**
|
|
26
|
+
|
|
27
|
+
现有 SEO/GEO 工具几乎全是英文 / 海外生态视角(只盯 ChatGPT / Perplexity,只认 Wikipedia / llms.txt)。**Chinese-Geo 把国内这一套补全,同时不丢海外主流**:国内爬虫准入、百度系结构化、知乎 / CSDN / 公众号站外矩阵、国产引擎引用监控——这是海外工具的空白。
|
|
28
|
+
|
|
29
|
+
> 命令行工具名为 `seogeo`(仓库名 `Chinese-Geo`)。
|
|
30
|
+
|
|
31
|
+
## ✨ 现在能做什么(v0)
|
|
32
|
+
|
|
33
|
+
一条命令,给你的站做 **AI 可见性体检**:7 个维度打分 + 中文优先级修复清单。
|
|
34
|
+
|
|
35
|
+
- **★ 国内 AI 爬虫准入** —— robots.txt 是否放行 Baiduspider / Bytespider / PetalBot / Sogou / YisouSpider,并按"**各家须单独成块、合并进 `*` 通配会被忽略**"的真实规则判定。还会探测 **Bytespider 是否真被服务端硬拦**(它不守 robots,robots 挡了≠真挡住),并支持**反向 DNS 校验爬虫 IP 真伪**。**别的工具没有这些。**
|
|
36
|
+
- **海外 AI 爬虫准入** —— GPTBot / ClaudeBot / PerplexityBot / Google-Extended 等是否被挡(海外爬虫遵守 `*` 通配,判定规则与国内不同)。
|
|
37
|
+
- **AI 可发现性** —— sitemap.xml(百度 / 搜狗提交友好)。
|
|
38
|
+
- **结构化数据** —— JSON-LD 存在性与合法性 + Open Graph 标签。
|
|
39
|
+
- **内容可引用性** —— 唯一 H1、H2 切分、正文足量(按**中文字符数**,不被"中文没空格"坑到)、列表 / 表格、新鲜度(日期信号)。
|
|
40
|
+
- **JS 渲染可见性** —— 检测前端渲染空壳,AI 爬虫是否只看到空白页。
|
|
41
|
+
- **技术基线** —— `<html lang>`、HTTPS、移动端 viewport。
|
|
42
|
+
|
|
43
|
+
确定性引擎,**运行时零依赖**(纯 Python 标准库),可进 CI、可复现。
|
|
44
|
+
|
|
45
|
+
## 🚀 快速开始
|
|
46
|
+
|
|
47
|
+
需要 Python 3.9+,无需任何第三方包。
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git clone https://github.com/qingqingpi/Chinese-Geo
|
|
51
|
+
cd Chinese-Geo
|
|
52
|
+
pip install -e .
|
|
53
|
+
|
|
54
|
+
seogeo audit example.com # 体检:中文报告
|
|
55
|
+
seogeo audit example.com --format json # 体检:JSON(给 agent / CI)
|
|
56
|
+
seogeo bots gen --sitemap https://example.com/sitemap.xml # 生成推荐 robots.txt(国内各家单独成块)
|
|
57
|
+
seogeo bots verify 116.179.32.160 Baiduspider # 反向 DNS 校验爬虫 IP 真伪
|
|
58
|
+
seogeo schema gen faqpage # 生成 JSON-LD 脚手架
|
|
59
|
+
seogeo llms gen --title "示例科技" # 生成 llms.txt 脚手架(主要面向海外引擎)
|
|
60
|
+
seogeo init --site "示例科技" # 一键打包 robots+llms+schema+canonical 清单 → seogeo-output/
|
|
61
|
+
seogeo monitor prompts --industry "智能客服" # 生成去品牌化问题(粘进各 AI 引擎收集回答)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
免安装直接跑:`python -m seogeo.cli audit example.com`
|
|
65
|
+
|
|
66
|
+
Claude Code 一键装成插件(含 6 个技能 + MCP),以及 Codex / Cursor 等其它 agent 的集成方式,见 **[INSTALL.md](INSTALL.md)**。
|
|
67
|
+
|
|
68
|
+
### 示例输出
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
# seogeo 体检报告:https://www.example.com
|
|
72
|
+
**总分 20/100 · 等级:亟需整改**
|
|
73
|
+
|
|
74
|
+
## 优先级修复清单
|
|
75
|
+
### 🔴 必须修
|
|
76
|
+
- [+20分 · ★国内 AI 爬虫准入] 为 Bytespider, PetalBot 各自单独写 User-agent 块并 Allow: /(合并进 * 通配段会被忽略)
|
|
77
|
+
- [+16分 · 内容可引用性] 补强:唯一 H1 主标题、H2 小节切分、正文≥300字、列表/表格
|
|
78
|
+
- [+16分 · 结构化] 添加 Organization / Article / FAQPage 等 JSON-LD
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 🧭 为什么国内要单独一套
|
|
82
|
+
|
|
83
|
+
每家国内 AI 主要"吃自己生态":豆包 ← 抖音 / 今日头条,元宝 ← 微信公众号,文心 ← 百度百科 / 百家号,通义 ← 门户自媒体,DeepSeek / Kimi ← 知乎 / CSDN 等公网 UGC。爬虫准入、站外分发、引用监控都与海外完全不同;llms.txt 在国内基本无效,GEO 主战场是"联网检索"而非训练语料。
|
|
84
|
+
|
|
85
|
+
## 🗺️ 路线图
|
|
86
|
+
|
|
87
|
+
- [x] CLI `audit`:AI 可见性体检(7 类 12 项检查,确定性引擎)
|
|
88
|
+
- [x] CLI 生成半边:`bots gen`(推荐 robots.txt,国内各家单独成块)+ `schema gen`(JSON-LD 脚手架)
|
|
89
|
+
- [x] Bytespider 服务端硬拦探测(robots 挡了≠真挡住)+ 反向 DNS 真伪校验(`bots verify`)
|
|
90
|
+
- [x] CLI `init` + `llms gen`:一键生成 robots + llms.txt + schema 脚手架 + canonical 自查清单
|
|
91
|
+
- [ ] 行动清单:预期效果(量化)+ 影响哪些引擎 + 怎么验证
|
|
92
|
+
- [x] 6 个 Agent Skill(vendor-neutral,跑在 Claude Code / Codex / CodeBuddy / Qoder / Kimi 等):**optimize 全流程总入口** / audit 体检 / structure 结构 / content 文案 / offsite 站外+实体 / monitor 引用率·SoV
|
|
93
|
+
- [x] 跨 Agent 指令层(`AGENTS.md` + `CLAUDE.md`,覆盖 Codex / opencode / Cursor / Trae / Kimi 等 30+ agent)
|
|
94
|
+
- [x] MCP server(8 工具:audit / bots_gen / schema_gen / llms_gen / monitor_prompts / monitor_run / monitor_score / offsite;可选 `pip install Chinese-Geo[mcp]`,跑 `seogeo-mcp`)
|
|
95
|
+
- [x] Claude 插件一键装(`.claude-plugin/` plugin.json + marketplace + 根 `.mcp.json`)→ 见 [INSTALL.md](INSTALL.md)
|
|
96
|
+
- [x] 跨 agent 一键接入:`seogeo init --agent <claude|codex|gemini|cursor|generic>`(写指令文件 + `.mcp.json`,不覆盖已有)
|
|
97
|
+
- [x] Claude 斜杠命令(`/seogeo:audit` `/seogeo:monitor`,直接跑 CLI 注入结果)
|
|
98
|
+
- [x] CI(GitHub Actions 跑 Python 3.9–3.12 测试)+ 打 GitHub Release 自动发 PyPI
|
|
99
|
+
- [x] 引用率 / SoV 监控(零 key 手动抽样,中文友好,真 SoV):`seogeo monitor` + seogeo-monitor Skill
|
|
100
|
+
- [x] 站外矩阵 + 实体权威层(知乎 / CSDN / 公众号 / 小红书…):`seogeo offsite` 确定性矩阵(按引擎×受众×开放/封闭)+ `seogeo-offsite` skill
|
|
101
|
+
- [x] BYOK 监控自动跑引擎(自带 key 一条命令跑完各引擎):`seogeo monitor run`
|
|
102
|
+
|
|
103
|
+
> ⚠️ 早期阶段(v0)。欢迎 issue / PR。
|
|
104
|
+
|
|
105
|
+
## 开发
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
pip install -e ".[dev]"
|
|
109
|
+
pytest
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
MIT © 2026 qingqingpi
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
Chinese_Geo.egg-info/PKG-INFO
|
|
5
|
+
Chinese_Geo.egg-info/SOURCES.txt
|
|
6
|
+
Chinese_Geo.egg-info/dependency_links.txt
|
|
7
|
+
Chinese_Geo.egg-info/entry_points.txt
|
|
8
|
+
Chinese_Geo.egg-info/requires.txt
|
|
9
|
+
Chinese_Geo.egg-info/top_level.txt
|
|
10
|
+
seogeo/__init__.py
|
|
11
|
+
seogeo/botverify.py
|
|
12
|
+
seogeo/cli.py
|
|
13
|
+
seogeo/dom.py
|
|
14
|
+
seogeo/engines.py
|
|
15
|
+
seogeo/fetch.py
|
|
16
|
+
seogeo/generate.py
|
|
17
|
+
seogeo/mcp_server.py
|
|
18
|
+
seogeo/monitor.py
|
|
19
|
+
seogeo/offsite.py
|
|
20
|
+
seogeo/pipeline.py
|
|
21
|
+
seogeo/report.py
|
|
22
|
+
seogeo/robots.py
|
|
23
|
+
seogeo/scoring.py
|
|
24
|
+
seogeo/service.py
|
|
25
|
+
seogeo/data/__init__.py
|
|
26
|
+
seogeo/data/domestic_bots.py
|
|
27
|
+
seogeo/data/overseas_bots.py
|
|
28
|
+
seogeo/data/platforms.py
|
|
29
|
+
seogeo/rules/__init__.py
|
|
30
|
+
seogeo/rules/base.py
|
|
31
|
+
seogeo/rules/bytespider.py
|
|
32
|
+
seogeo/rules/content.py
|
|
33
|
+
seogeo/rules/discovery.py
|
|
34
|
+
seogeo/rules/domestic_bots.py
|
|
35
|
+
seogeo/rules/freshness.py
|
|
36
|
+
seogeo/rules/https.py
|
|
37
|
+
seogeo/rules/opengraph.py
|
|
38
|
+
seogeo/rules/overseas_bots.py
|
|
39
|
+
seogeo/rules/rendering.py
|
|
40
|
+
seogeo/rules/structure.py
|
|
41
|
+
seogeo/rules/technical.py
|
|
42
|
+
seogeo/rules/viewport.py
|
|
43
|
+
tests/test_botverify.py
|
|
44
|
+
tests/test_bytespider.py
|
|
45
|
+
tests/test_content.py
|
|
46
|
+
tests/test_discovery.py
|
|
47
|
+
tests/test_dom.py
|
|
48
|
+
tests/test_domestic_bots.py
|
|
49
|
+
tests/test_engines.py
|
|
50
|
+
tests/test_fetch.py
|
|
51
|
+
tests/test_generate.py
|
|
52
|
+
tests/test_meta_rules.py
|
|
53
|
+
tests/test_monitor.py
|
|
54
|
+
tests/test_offsite.py
|
|
55
|
+
tests/test_overseas_bots.py
|
|
56
|
+
tests/test_packaging.py
|
|
57
|
+
tests/test_pipeline.py
|
|
58
|
+
tests/test_registry.py
|
|
59
|
+
tests/test_rendering.py
|
|
60
|
+
tests/test_report.py
|
|
61
|
+
tests/test_robots.py
|
|
62
|
+
tests/test_scoring.py
|
|
63
|
+
tests/test_skills.py
|
|
64
|
+
tests/test_structure.py
|
|
65
|
+
tests/test_technical.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
seogeo
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 qingqingpi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: Chinese-Geo
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: 中文 / 国内生态优先的开源 SEO + GEO 工具包(让站点被国内 AI 引擎抓取与引用)
|
|
5
|
+
Author: qingqingpi
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/qingqingpi/Chinese-Geo
|
|
8
|
+
Project-URL: Repository, https://github.com/qingqingpi/Chinese-Geo
|
|
9
|
+
Project-URL: Issues, https://github.com/qingqingpi/Chinese-Geo/issues
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Provides-Extra: render
|
|
14
|
+
Requires-Dist: playwright>=1.40; extra == "render"
|
|
15
|
+
Provides-Extra: mcp
|
|
16
|
+
Requires-Dist: mcp>=1.0; extra == "mcp"
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# Chinese-Geo
|
|
22
|
+
|
|
23
|
+
> 中文 / 国内生态优先的开源 **SEO + GEO(生成式引擎优化)** 工具包。
|
|
24
|
+
> 让你的网站被**豆包 / DeepSeek / 文心一言 / 通义千问 / 腾讯元宝 / Kimi** 等国内 AI 引擎**抓得到、看得懂、愿意引用**。
|
|
25
|
+
> **国内生态是差异化核心,海外主流(ChatGPT / Claude / Perplexity / Google AI)一并覆盖——两个生态,一个工具。**
|
|
26
|
+
|
|
27
|
+
现有 SEO/GEO 工具几乎全是英文 / 海外生态视角(只盯 ChatGPT / Perplexity,只认 Wikipedia / llms.txt)。**Chinese-Geo 把国内这一套补全,同时不丢海外主流**:国内爬虫准入、百度系结构化、知乎 / CSDN / 公众号站外矩阵、国产引擎引用监控——这是海外工具的空白。
|
|
28
|
+
|
|
29
|
+
> 命令行工具名为 `seogeo`(仓库名 `Chinese-Geo`)。
|
|
30
|
+
|
|
31
|
+
## ✨ 现在能做什么(v0)
|
|
32
|
+
|
|
33
|
+
一条命令,给你的站做 **AI 可见性体检**:7 个维度打分 + 中文优先级修复清单。
|
|
34
|
+
|
|
35
|
+
- **★ 国内 AI 爬虫准入** —— robots.txt 是否放行 Baiduspider / Bytespider / PetalBot / Sogou / YisouSpider,并按"**各家须单独成块、合并进 `*` 通配会被忽略**"的真实规则判定。还会探测 **Bytespider 是否真被服务端硬拦**(它不守 robots,robots 挡了≠真挡住),并支持**反向 DNS 校验爬虫 IP 真伪**。**别的工具没有这些。**
|
|
36
|
+
- **海外 AI 爬虫准入** —— GPTBot / ClaudeBot / PerplexityBot / Google-Extended 等是否被挡(海外爬虫遵守 `*` 通配,判定规则与国内不同)。
|
|
37
|
+
- **AI 可发现性** —— sitemap.xml(百度 / 搜狗提交友好)。
|
|
38
|
+
- **结构化数据** —— JSON-LD 存在性与合法性 + Open Graph 标签。
|
|
39
|
+
- **内容可引用性** —— 唯一 H1、H2 切分、正文足量(按**中文字符数**,不被"中文没空格"坑到)、列表 / 表格、新鲜度(日期信号)。
|
|
40
|
+
- **JS 渲染可见性** —— 检测前端渲染空壳,AI 爬虫是否只看到空白页。
|
|
41
|
+
- **技术基线** —— `<html lang>`、HTTPS、移动端 viewport。
|
|
42
|
+
|
|
43
|
+
确定性引擎,**运行时零依赖**(纯 Python 标准库),可进 CI、可复现。
|
|
44
|
+
|
|
45
|
+
## 🚀 快速开始
|
|
46
|
+
|
|
47
|
+
需要 Python 3.9+,无需任何第三方包。
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git clone https://github.com/qingqingpi/Chinese-Geo
|
|
51
|
+
cd Chinese-Geo
|
|
52
|
+
pip install -e .
|
|
53
|
+
|
|
54
|
+
seogeo audit example.com # 体检:中文报告
|
|
55
|
+
seogeo audit example.com --format json # 体检:JSON(给 agent / CI)
|
|
56
|
+
seogeo bots gen --sitemap https://example.com/sitemap.xml # 生成推荐 robots.txt(国内各家单独成块)
|
|
57
|
+
seogeo bots verify 116.179.32.160 Baiduspider # 反向 DNS 校验爬虫 IP 真伪
|
|
58
|
+
seogeo schema gen faqpage # 生成 JSON-LD 脚手架
|
|
59
|
+
seogeo llms gen --title "示例科技" # 生成 llms.txt 脚手架(主要面向海外引擎)
|
|
60
|
+
seogeo init --site "示例科技" # 一键打包 robots+llms+schema+canonical 清单 → seogeo-output/
|
|
61
|
+
seogeo monitor prompts --industry "智能客服" # 生成去品牌化问题(粘进各 AI 引擎收集回答)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
免安装直接跑:`python -m seogeo.cli audit example.com`
|
|
65
|
+
|
|
66
|
+
Claude Code 一键装成插件(含 6 个技能 + MCP),以及 Codex / Cursor 等其它 agent 的集成方式,见 **[INSTALL.md](INSTALL.md)**。
|
|
67
|
+
|
|
68
|
+
### 示例输出
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
# seogeo 体检报告:https://www.example.com
|
|
72
|
+
**总分 20/100 · 等级:亟需整改**
|
|
73
|
+
|
|
74
|
+
## 优先级修复清单
|
|
75
|
+
### 🔴 必须修
|
|
76
|
+
- [+20分 · ★国内 AI 爬虫准入] 为 Bytespider, PetalBot 各自单独写 User-agent 块并 Allow: /(合并进 * 通配段会被忽略)
|
|
77
|
+
- [+16分 · 内容可引用性] 补强:唯一 H1 主标题、H2 小节切分、正文≥300字、列表/表格
|
|
78
|
+
- [+16分 · 结构化] 添加 Organization / Article / FAQPage 等 JSON-LD
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 🧭 为什么国内要单独一套
|
|
82
|
+
|
|
83
|
+
每家国内 AI 主要"吃自己生态":豆包 ← 抖音 / 今日头条,元宝 ← 微信公众号,文心 ← 百度百科 / 百家号,通义 ← 门户自媒体,DeepSeek / Kimi ← 知乎 / CSDN 等公网 UGC。爬虫准入、站外分发、引用监控都与海外完全不同;llms.txt 在国内基本无效,GEO 主战场是"联网检索"而非训练语料。
|
|
84
|
+
|
|
85
|
+
## 🗺️ 路线图
|
|
86
|
+
|
|
87
|
+
- [x] CLI `audit`:AI 可见性体检(7 类 12 项检查,确定性引擎)
|
|
88
|
+
- [x] CLI 生成半边:`bots gen`(推荐 robots.txt,国内各家单独成块)+ `schema gen`(JSON-LD 脚手架)
|
|
89
|
+
- [x] Bytespider 服务端硬拦探测(robots 挡了≠真挡住)+ 反向 DNS 真伪校验(`bots verify`)
|
|
90
|
+
- [x] CLI `init` + `llms gen`:一键生成 robots + llms.txt + schema 脚手架 + canonical 自查清单
|
|
91
|
+
- [ ] 行动清单:预期效果(量化)+ 影响哪些引擎 + 怎么验证
|
|
92
|
+
- [x] 6 个 Agent Skill(vendor-neutral,跑在 Claude Code / Codex / CodeBuddy / Qoder / Kimi 等):**optimize 全流程总入口** / audit 体检 / structure 结构 / content 文案 / offsite 站外+实体 / monitor 引用率·SoV
|
|
93
|
+
- [x] 跨 Agent 指令层(`AGENTS.md` + `CLAUDE.md`,覆盖 Codex / opencode / Cursor / Trae / Kimi 等 30+ agent)
|
|
94
|
+
- [x] MCP server(8 工具:audit / bots_gen / schema_gen / llms_gen / monitor_prompts / monitor_run / monitor_score / offsite;可选 `pip install Chinese-Geo[mcp]`,跑 `seogeo-mcp`)
|
|
95
|
+
- [x] Claude 插件一键装(`.claude-plugin/` plugin.json + marketplace + 根 `.mcp.json`)→ 见 [INSTALL.md](INSTALL.md)
|
|
96
|
+
- [x] 跨 agent 一键接入:`seogeo init --agent <claude|codex|gemini|cursor|generic>`(写指令文件 + `.mcp.json`,不覆盖已有)
|
|
97
|
+
- [x] Claude 斜杠命令(`/seogeo:audit` `/seogeo:monitor`,直接跑 CLI 注入结果)
|
|
98
|
+
- [x] CI(GitHub Actions 跑 Python 3.9–3.12 测试)+ 打 GitHub Release 自动发 PyPI
|
|
99
|
+
- [x] 引用率 / SoV 监控(零 key 手动抽样,中文友好,真 SoV):`seogeo monitor` + seogeo-monitor Skill
|
|
100
|
+
- [x] 站外矩阵 + 实体权威层(知乎 / CSDN / 公众号 / 小红书…):`seogeo offsite` 确定性矩阵(按引擎×受众×开放/封闭)+ `seogeo-offsite` skill
|
|
101
|
+
- [x] BYOK 监控自动跑引擎(自带 key 一条命令跑完各引擎):`seogeo monitor run`
|
|
102
|
+
|
|
103
|
+
> ⚠️ 早期阶段(v0)。欢迎 issue / PR。
|
|
104
|
+
|
|
105
|
+
## 开发
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
pip install -e ".[dev]"
|
|
109
|
+
pytest
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
MIT © 2026 qingqingpi
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Chinese-Geo
|
|
2
|
+
|
|
3
|
+
> 中文 / 国内生态优先的开源 **SEO + GEO(生成式引擎优化)** 工具包。
|
|
4
|
+
> 让你的网站被**豆包 / DeepSeek / 文心一言 / 通义千问 / 腾讯元宝 / Kimi** 等国内 AI 引擎**抓得到、看得懂、愿意引用**。
|
|
5
|
+
> **国内生态是差异化核心,海外主流(ChatGPT / Claude / Perplexity / Google AI)一并覆盖——两个生态,一个工具。**
|
|
6
|
+
|
|
7
|
+
现有 SEO/GEO 工具几乎全是英文 / 海外生态视角(只盯 ChatGPT / Perplexity,只认 Wikipedia / llms.txt)。**Chinese-Geo 把国内这一套补全,同时不丢海外主流**:国内爬虫准入、百度系结构化、知乎 / CSDN / 公众号站外矩阵、国产引擎引用监控——这是海外工具的空白。
|
|
8
|
+
|
|
9
|
+
> 命令行工具名为 `seogeo`(仓库名 `Chinese-Geo`)。
|
|
10
|
+
|
|
11
|
+
## ✨ 现在能做什么(v0)
|
|
12
|
+
|
|
13
|
+
一条命令,给你的站做 **AI 可见性体检**:7 个维度打分 + 中文优先级修复清单。
|
|
14
|
+
|
|
15
|
+
- **★ 国内 AI 爬虫准入** —— robots.txt 是否放行 Baiduspider / Bytespider / PetalBot / Sogou / YisouSpider,并按"**各家须单独成块、合并进 `*` 通配会被忽略**"的真实规则判定。还会探测 **Bytespider 是否真被服务端硬拦**(它不守 robots,robots 挡了≠真挡住),并支持**反向 DNS 校验爬虫 IP 真伪**。**别的工具没有这些。**
|
|
16
|
+
- **海外 AI 爬虫准入** —— GPTBot / ClaudeBot / PerplexityBot / Google-Extended 等是否被挡(海外爬虫遵守 `*` 通配,判定规则与国内不同)。
|
|
17
|
+
- **AI 可发现性** —— sitemap.xml(百度 / 搜狗提交友好)。
|
|
18
|
+
- **结构化数据** —— JSON-LD 存在性与合法性 + Open Graph 标签。
|
|
19
|
+
- **内容可引用性** —— 唯一 H1、H2 切分、正文足量(按**中文字符数**,不被"中文没空格"坑到)、列表 / 表格、新鲜度(日期信号)。
|
|
20
|
+
- **JS 渲染可见性** —— 检测前端渲染空壳,AI 爬虫是否只看到空白页。
|
|
21
|
+
- **技术基线** —— `<html lang>`、HTTPS、移动端 viewport。
|
|
22
|
+
|
|
23
|
+
确定性引擎,**运行时零依赖**(纯 Python 标准库),可进 CI、可复现。
|
|
24
|
+
|
|
25
|
+
## 🚀 快速开始
|
|
26
|
+
|
|
27
|
+
需要 Python 3.9+,无需任何第三方包。
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
git clone https://github.com/qingqingpi/Chinese-Geo
|
|
31
|
+
cd Chinese-Geo
|
|
32
|
+
pip install -e .
|
|
33
|
+
|
|
34
|
+
seogeo audit example.com # 体检:中文报告
|
|
35
|
+
seogeo audit example.com --format json # 体检:JSON(给 agent / CI)
|
|
36
|
+
seogeo bots gen --sitemap https://example.com/sitemap.xml # 生成推荐 robots.txt(国内各家单独成块)
|
|
37
|
+
seogeo bots verify 116.179.32.160 Baiduspider # 反向 DNS 校验爬虫 IP 真伪
|
|
38
|
+
seogeo schema gen faqpage # 生成 JSON-LD 脚手架
|
|
39
|
+
seogeo llms gen --title "示例科技" # 生成 llms.txt 脚手架(主要面向海外引擎)
|
|
40
|
+
seogeo init --site "示例科技" # 一键打包 robots+llms+schema+canonical 清单 → seogeo-output/
|
|
41
|
+
seogeo monitor prompts --industry "智能客服" # 生成去品牌化问题(粘进各 AI 引擎收集回答)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
免安装直接跑:`python -m seogeo.cli audit example.com`
|
|
45
|
+
|
|
46
|
+
Claude Code 一键装成插件(含 6 个技能 + MCP),以及 Codex / Cursor 等其它 agent 的集成方式,见 **[INSTALL.md](INSTALL.md)**。
|
|
47
|
+
|
|
48
|
+
### 示例输出
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
# seogeo 体检报告:https://www.example.com
|
|
52
|
+
**总分 20/100 · 等级:亟需整改**
|
|
53
|
+
|
|
54
|
+
## 优先级修复清单
|
|
55
|
+
### 🔴 必须修
|
|
56
|
+
- [+20分 · ★国内 AI 爬虫准入] 为 Bytespider, PetalBot 各自单独写 User-agent 块并 Allow: /(合并进 * 通配段会被忽略)
|
|
57
|
+
- [+16分 · 内容可引用性] 补强:唯一 H1 主标题、H2 小节切分、正文≥300字、列表/表格
|
|
58
|
+
- [+16分 · 结构化] 添加 Organization / Article / FAQPage 等 JSON-LD
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 🧭 为什么国内要单独一套
|
|
62
|
+
|
|
63
|
+
每家国内 AI 主要"吃自己生态":豆包 ← 抖音 / 今日头条,元宝 ← 微信公众号,文心 ← 百度百科 / 百家号,通义 ← 门户自媒体,DeepSeek / Kimi ← 知乎 / CSDN 等公网 UGC。爬虫准入、站外分发、引用监控都与海外完全不同;llms.txt 在国内基本无效,GEO 主战场是"联网检索"而非训练语料。
|
|
64
|
+
|
|
65
|
+
## 🗺️ 路线图
|
|
66
|
+
|
|
67
|
+
- [x] CLI `audit`:AI 可见性体检(7 类 12 项检查,确定性引擎)
|
|
68
|
+
- [x] CLI 生成半边:`bots gen`(推荐 robots.txt,国内各家单独成块)+ `schema gen`(JSON-LD 脚手架)
|
|
69
|
+
- [x] Bytespider 服务端硬拦探测(robots 挡了≠真挡住)+ 反向 DNS 真伪校验(`bots verify`)
|
|
70
|
+
- [x] CLI `init` + `llms gen`:一键生成 robots + llms.txt + schema 脚手架 + canonical 自查清单
|
|
71
|
+
- [ ] 行动清单:预期效果(量化)+ 影响哪些引擎 + 怎么验证
|
|
72
|
+
- [x] 6 个 Agent Skill(vendor-neutral,跑在 Claude Code / Codex / CodeBuddy / Qoder / Kimi 等):**optimize 全流程总入口** / audit 体检 / structure 结构 / content 文案 / offsite 站外+实体 / monitor 引用率·SoV
|
|
73
|
+
- [x] 跨 Agent 指令层(`AGENTS.md` + `CLAUDE.md`,覆盖 Codex / opencode / Cursor / Trae / Kimi 等 30+ agent)
|
|
74
|
+
- [x] MCP server(8 工具:audit / bots_gen / schema_gen / llms_gen / monitor_prompts / monitor_run / monitor_score / offsite;可选 `pip install Chinese-Geo[mcp]`,跑 `seogeo-mcp`)
|
|
75
|
+
- [x] Claude 插件一键装(`.claude-plugin/` plugin.json + marketplace + 根 `.mcp.json`)→ 见 [INSTALL.md](INSTALL.md)
|
|
76
|
+
- [x] 跨 agent 一键接入:`seogeo init --agent <claude|codex|gemini|cursor|generic>`(写指令文件 + `.mcp.json`,不覆盖已有)
|
|
77
|
+
- [x] Claude 斜杠命令(`/seogeo:audit` `/seogeo:monitor`,直接跑 CLI 注入结果)
|
|
78
|
+
- [x] CI(GitHub Actions 跑 Python 3.9–3.12 测试)+ 打 GitHub Release 自动发 PyPI
|
|
79
|
+
- [x] 引用率 / SoV 监控(零 key 手动抽样,中文友好,真 SoV):`seogeo monitor` + seogeo-monitor Skill
|
|
80
|
+
- [x] 站外矩阵 + 实体权威层(知乎 / CSDN / 公众号 / 小红书…):`seogeo offsite` 确定性矩阵(按引擎×受众×开放/封闭)+ `seogeo-offsite` skill
|
|
81
|
+
- [x] BYOK 监控自动跑引擎(自带 key 一条命令跑完各引擎):`seogeo monitor run`
|
|
82
|
+
|
|
83
|
+
> ⚠️ 早期阶段(v0)。欢迎 issue / PR。
|
|
84
|
+
|
|
85
|
+
## 开发
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pip install -e ".[dev]"
|
|
89
|
+
pytest
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## License
|
|
93
|
+
|
|
94
|
+
MIT © 2026 qingqingpi
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "Chinese-Geo"
|
|
3
|
+
version = "0.1.1"
|
|
4
|
+
description = "中文 / 国内生态优先的开源 SEO + GEO 工具包(让站点被国内 AI 引擎抓取与引用)"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = {text = "MIT"}
|
|
7
|
+
authors = [{name = "qingqingpi"}]
|
|
8
|
+
requires-python = ">=3.9"
|
|
9
|
+
dependencies = [] # 运行时零依赖(核心)
|
|
10
|
+
|
|
11
|
+
[project.urls]
|
|
12
|
+
Homepage = "https://github.com/qingqingpi/Chinese-Geo"
|
|
13
|
+
Repository = "https://github.com/qingqingpi/Chinese-Geo"
|
|
14
|
+
Issues = "https://github.com/qingqingpi/Chinese-Geo/issues"
|
|
15
|
+
|
|
16
|
+
[project.optional-dependencies]
|
|
17
|
+
render = ["playwright>=1.40"] # 可选:JS 渲染对比
|
|
18
|
+
mcp = ["mcp>=1.0"] # 可选:MCP server(seogeo-mcp)
|
|
19
|
+
dev = ["pytest>=7"]
|
|
20
|
+
|
|
21
|
+
[project.scripts]
|
|
22
|
+
seogeo = "seogeo.cli:main"
|
|
23
|
+
seogeo-mcp = "seogeo.mcp_server:main"
|
|
24
|
+
|
|
25
|
+
[build-system]
|
|
26
|
+
requires = ["setuptools>=61"]
|
|
27
|
+
build-backend = "setuptools.build_meta"
|
|
28
|
+
|
|
29
|
+
[tool.setuptools.packages.find]
|
|
30
|
+
where = ["."]
|
|
31
|
+
include = ["seogeo*"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.1"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""爬虫真伪 / 拦截判定。
|
|
2
|
+
|
|
3
|
+
- looks_blocked:纯逻辑,判断 Bytespider 是否被服务端拦(用 browser-UA vs Bytespider-UA 对比)。
|
|
4
|
+
- verify_bot_ip:反向 + 正向 DNS 双向校验某 IP 是否真为该爬虫(reverse/forward 可注入,便于测试)。
|
|
5
|
+
- probe_bytespider_blocked:薄网络层,实际跑两次抓取喂给 looks_blocked。
|
|
6
|
+
"""
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import socket
|
|
10
|
+
|
|
11
|
+
from seogeo.data.domestic_bots import DOMESTIC_BOT_RDNS
|
|
12
|
+
from seogeo.fetch import fetch
|
|
13
|
+
|
|
14
|
+
_CHALLENGE = ["just a moment", "checking your browser", "access denied", "captcha", "forbidden", "blocked"]
|
|
15
|
+
_BLOCK_STATUS = {403, 429, 451, 503}
|
|
16
|
+
|
|
17
|
+
_BROWSER_UA = ("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
|
|
18
|
+
"(KHTML, like Gecko) Chrome/120 Safari/537.36")
|
|
19
|
+
_BYTESPIDER_UA = "Mozilla/5.0 (compatible; Bytespider; https://zhanzhang.toutiao.com/)"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def looks_blocked(browser, bot):
|
|
23
|
+
"""返回 True/False;任一抓取缺失返回 None。"""
|
|
24
|
+
if not browser or not bot:
|
|
25
|
+
return None
|
|
26
|
+
if bot["status"] in _BLOCK_STATUS:
|
|
27
|
+
return True
|
|
28
|
+
if any(k in (bot.get("text") or "")[:5000].lower() for k in _CHALLENGE):
|
|
29
|
+
return True
|
|
30
|
+
blen, botlen = len(browser.get("text") or ""), len(bot.get("text") or "")
|
|
31
|
+
if browser["status"] == 200 and bot["status"] == 200 and blen > 0 and botlen < 0.3 * blen:
|
|
32
|
+
return True
|
|
33
|
+
return False
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def verify_bot_ip(ip: str, bot: str, reverse=None, forward=None) -> bool:
|
|
37
|
+
"""反向 + 正向 DNS 双向校验(百度/谷歌官方推荐法)。仅支持有 rDNS 落点的爬虫。"""
|
|
38
|
+
suffix = DOMESTIC_BOT_RDNS.get(bot)
|
|
39
|
+
if not suffix:
|
|
40
|
+
return False
|
|
41
|
+
reverse = reverse or (lambda i: socket.gethostbyaddr(i)[0])
|
|
42
|
+
forward = forward or (lambda h: socket.gethostbyname_ex(h)[2])
|
|
43
|
+
try:
|
|
44
|
+
host = reverse(ip)
|
|
45
|
+
if not host.endswith(suffix):
|
|
46
|
+
return False
|
|
47
|
+
return ip in forward(host)
|
|
48
|
+
except OSError:
|
|
49
|
+
return False
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def probe_bytespider_blocked(url: str):
|
|
53
|
+
"""实际抓两次(浏览器 UA + Bytespider UA)判断是否被服务端拦。返回 True/False/None。"""
|
|
54
|
+
browser, _ = fetch(url, ua=_BROWSER_UA)
|
|
55
|
+
bot, _ = fetch(url, ua=_BYTESPIDER_UA)
|
|
56
|
+
return looks_blocked(browser, bot)
|