foxfetch 0.1.5__tar.gz → 0.1.6__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.
- {foxfetch-0.1.5 → foxfetch-0.1.6}/PKG-INFO +33 -47
- {foxfetch-0.1.5 → foxfetch-0.1.6}/README.md +32 -46
- {foxfetch-0.1.5 → foxfetch-0.1.6}/README.zh.md +30 -45
- {foxfetch-0.1.5 → foxfetch-0.1.6}/pyproject.toml +1 -1
- {foxfetch-0.1.5 → foxfetch-0.1.6}/src/foxfetch/__init__.py +1 -1
- {foxfetch-0.1.5 → foxfetch-0.1.6}/.gitignore +0 -0
- {foxfetch-0.1.5 → foxfetch-0.1.6}/INSTALL.md +0 -0
- {foxfetch-0.1.5 → foxfetch-0.1.6}/LICENSE +0 -0
- {foxfetch-0.1.5 → foxfetch-0.1.6}/dsh/README.md +0 -0
- {foxfetch-0.1.5 → foxfetch-0.1.6}/src/foxfetch/__main__.py +0 -0
- {foxfetch-0.1.5 → foxfetch-0.1.6}/src/foxfetch/cli.py +0 -0
- {foxfetch-0.1.5 → foxfetch-0.1.6}/src/foxfetch/config.py +0 -0
- {foxfetch-0.1.5 → foxfetch-0.1.6}/src/foxfetch/contexts.py +0 -0
- {foxfetch-0.1.5 → foxfetch-0.1.6}/src/foxfetch/doctor.py +0 -0
- {foxfetch-0.1.5 → foxfetch-0.1.6}/src/foxfetch/engine.py +0 -0
- {foxfetch-0.1.5 → foxfetch-0.1.6}/src/foxfetch/probe.py +0 -0
- {foxfetch-0.1.5 → foxfetch-0.1.6}/src/foxfetch/server.py +0 -0
- {foxfetch-0.1.5 → foxfetch-0.1.6}/src/foxfetch/shapes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: foxfetch
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: Fetch pages through a real Firefox engine (ruyijs) for AI agents: pass bot checks, run the page's own JavaScript, then hand the identity to Chromium when a screenshot is needed.
|
|
5
5
|
Project-URL: Homepage, https://github.com/zhuchongba-01/foxfetch
|
|
6
6
|
Project-URL: Repository, https://github.com/zhuchongba-01/foxfetch
|
|
@@ -58,32 +58,23 @@ Description-Content-Type: text/markdown
|
|
|
58
58
|
[](https://www.npmjs.com/package/dsh-foxfetch)
|
|
59
59
|
[](LICENSE)
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
check, and read what only a browser can see. When a screenshot is needed, it hands the identity
|
|
64
|
-
it earned to Chromium.
|
|
61
|
+
Runs a page in a real Firefox engine to get past bot checks, then hands the identity to Chromium
|
|
62
|
+
when a screenshot is needed.
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## Install in 30 seconds
|
|
69
|
-
|
|
70
|
-
**1. Install the service** (once per machine — **every host needs this, DSH included**):
|
|
64
|
+
## Install
|
|
71
65
|
|
|
72
66
|
```bash
|
|
73
67
|
pip install foxfetch
|
|
74
68
|
```
|
|
75
69
|
|
|
76
|
-
|
|
70
|
+
That is the service, and every host needs it. Then one of these two:
|
|
77
71
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
**3. Install for your agent** — there are only two cases:
|
|
83
|
-
|
|
84
|
-
### If you use DeepSeek Harness (DSH)
|
|
72
|
+
| You use | Run this next |
|
|
73
|
+
|---|---|
|
|
74
|
+
| **DeepSeek Harness** (DSH) | `pnpm add dsh-foxfetch` inside `~/.dsh/profiles/desktop`, add it to `dsh.profile.bundles`, restart → [steps](#deepseek-harness) |
|
|
75
|
+
| **Pi / Claude Code / Codex / other MCP client** | nothing to install, just a config entry → [steps](#pi) |
|
|
85
76
|
|
|
86
|
-
|
|
77
|
+
### DSH, both commands together
|
|
87
78
|
|
|
88
79
|
```powershell
|
|
89
80
|
pip install foxfetch
|
|
@@ -91,49 +82,44 @@ cd "$env:USERPROFILE\.dsh\profiles\desktop"
|
|
|
91
82
|
pnpm add dsh-foxfetch
|
|
92
83
|
```
|
|
93
84
|
|
|
94
|
-
Then add `"dsh-foxfetch"` to `dsh.profile.bundles` in that `package.json` and restart
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
### If you use anything else (Pi, Claude Code, Codex, other MCP clients)
|
|
85
|
+
Then add `"dsh-foxfetch"` to `dsh.profile.bundles` in that folder's `package.json` and restart
|
|
86
|
+
DSH. Exact file content: [DSH steps](#deepseek-harness).
|
|
98
87
|
|
|
99
|
-
|
|
88
|
+
### Everyone else, one config entry
|
|
100
89
|
|
|
101
90
|
```bash
|
|
102
|
-
|
|
91
|
+
pi mcp add foxfetch -- python -m foxfetch serve # Pi
|
|
92
|
+
claude mcp add foxfetch -- python -m foxfetch serve # Claude Code
|
|
103
93
|
```
|
|
104
94
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
| Client | What to do |
|
|
108
|
-
|---|---|
|
|
109
|
-
| **Pi** | `pi mcp add foxfetch -- python -m foxfetch serve` |
|
|
110
|
-
| **Claude Code** | `claude mcp add foxfetch -- python -m foxfetch serve` |
|
|
111
|
-
| **Codex** | add the `[mcp_servers.foxfetch]` table to `~/.codex/config.toml` → [steps](#codex) |
|
|
112
|
-
| **Any other MCP client** | `command: python`, `args: ["-m", "foxfetch", "serve"]` |
|
|
95
|
+
Codex takes a table in `~/.codex/config.toml` ([steps](#codex)); any other MCP client takes
|
|
96
|
+
`command: python`, `args: ["-m", "foxfetch", "serve"]`.
|
|
113
97
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
| | DSH | Everything else |
|
|
117
|
-
|---|---|---|
|
|
118
|
-
| Mechanism | native plugin, loaded by DSH | MCP config entry, read by the client |
|
|
119
|
-
| Package to install | `pip` **and** npm | `pip` only |
|
|
120
|
-
| Without it | plugin fails: `cannot start the Python service` | client sees no tools |
|
|
98
|
+
## Verify
|
|
121
99
|
|
|
122
|
-
|
|
100
|
+
```bash
|
|
101
|
+
python -m foxfetch doctor # expect "ok": true
|
|
102
|
+
```
|
|
123
103
|
|
|
124
|
-
|
|
104
|
+
Then ask your agent:
|
|
125
105
|
|
|
126
106
|
```
|
|
127
107
|
foxfetch_run(js="navigator.userAgent", url="https://example.com")
|
|
128
108
|
```
|
|
129
109
|
|
|
130
|
-
|
|
131
|
-
|
|
110
|
+
It must answer with `Firefox/160.0`. If it says `Python-urllib` or `HeadlessChrome`, the agent is
|
|
111
|
+
not reaching the engine — nothing else will work until that is fixed.
|
|
132
112
|
|
|
133
|
-
> **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent:
|
|
134
|
-
>
|
|
113
|
+
> **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent: you
|
|
114
|
+
> would get the same seven tools twice (`foxfetch_run` and `mcp__foxfetch__run`).
|
|
135
115
|
|
|
136
|
-
|
|
116
|
+
## Why this exists
|
|
117
|
+
|
|
118
|
+
`curl` gets a 403. Headless Chrome gets fingerprinted. foxfetch runs the site's own JavaScript in
|
|
119
|
+
a real Firefox engine (SpiderMonkey + Necko, no window, no renderer), so the TLS handshake and
|
|
120
|
+
the JS environment are those of a real browser — and it keeps that world alive between calls.
|
|
121
|
+
When a screenshot or a click is needed, `handoff` exports the identity it earned so Chromium can
|
|
122
|
+
finish the job.
|
|
137
123
|
|
|
138
124
|
## Detailed install
|
|
139
125
|
|
|
@@ -9,32 +9,23 @@
|
|
|
9
9
|
[](https://www.npmjs.com/package/dsh-foxfetch)
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
check, and read what only a browser can see. When a screenshot is needed, it hands the identity
|
|
15
|
-
it earned to Chromium.
|
|
12
|
+
Runs a page in a real Firefox engine to get past bot checks, then hands the identity to Chromium
|
|
13
|
+
when a screenshot is needed.
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## Install in 30 seconds
|
|
20
|
-
|
|
21
|
-
**1. Install the service** (once per machine — **every host needs this, DSH included**):
|
|
15
|
+
## Install
|
|
22
16
|
|
|
23
17
|
```bash
|
|
24
18
|
pip install foxfetch
|
|
25
19
|
```
|
|
26
20
|
|
|
27
|
-
|
|
21
|
+
That is the service, and every host needs it. Then one of these two:
|
|
28
22
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
**3. Install for your agent** — there are only two cases:
|
|
34
|
-
|
|
35
|
-
### If you use DeepSeek Harness (DSH)
|
|
23
|
+
| You use | Run this next |
|
|
24
|
+
|---|---|
|
|
25
|
+
| **DeepSeek Harness** (DSH) | `pnpm add dsh-foxfetch` inside `~/.dsh/profiles/desktop`, add it to `dsh.profile.bundles`, restart → [steps](#deepseek-harness) |
|
|
26
|
+
| **Pi / Claude Code / Codex / other MCP client** | nothing to install, just a config entry → [steps](#pi) |
|
|
36
27
|
|
|
37
|
-
|
|
28
|
+
### DSH, both commands together
|
|
38
29
|
|
|
39
30
|
```powershell
|
|
40
31
|
pip install foxfetch
|
|
@@ -42,49 +33,44 @@ cd "$env:USERPROFILE\.dsh\profiles\desktop"
|
|
|
42
33
|
pnpm add dsh-foxfetch
|
|
43
34
|
```
|
|
44
35
|
|
|
45
|
-
Then add `"dsh-foxfetch"` to `dsh.profile.bundles` in that `package.json` and restart
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
### If you use anything else (Pi, Claude Code, Codex, other MCP clients)
|
|
36
|
+
Then add `"dsh-foxfetch"` to `dsh.profile.bundles` in that folder's `package.json` and restart
|
|
37
|
+
DSH. Exact file content: [DSH steps](#deepseek-harness).
|
|
49
38
|
|
|
50
|
-
|
|
39
|
+
### Everyone else, one config entry
|
|
51
40
|
|
|
52
41
|
```bash
|
|
53
|
-
|
|
42
|
+
pi mcp add foxfetch -- python -m foxfetch serve # Pi
|
|
43
|
+
claude mcp add foxfetch -- python -m foxfetch serve # Claude Code
|
|
54
44
|
```
|
|
55
45
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
| Client | What to do |
|
|
59
|
-
|---|---|
|
|
60
|
-
| **Pi** | `pi mcp add foxfetch -- python -m foxfetch serve` |
|
|
61
|
-
| **Claude Code** | `claude mcp add foxfetch -- python -m foxfetch serve` |
|
|
62
|
-
| **Codex** | add the `[mcp_servers.foxfetch]` table to `~/.codex/config.toml` → [steps](#codex) |
|
|
63
|
-
| **Any other MCP client** | `command: python`, `args: ["-m", "foxfetch", "serve"]` |
|
|
46
|
+
Codex takes a table in `~/.codex/config.toml` ([steps](#codex)); any other MCP client takes
|
|
47
|
+
`command: python`, `args: ["-m", "foxfetch", "serve"]`.
|
|
64
48
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
| | DSH | Everything else |
|
|
68
|
-
|---|---|---|
|
|
69
|
-
| Mechanism | native plugin, loaded by DSH | MCP config entry, read by the client |
|
|
70
|
-
| Package to install | `pip` **and** npm | `pip` only |
|
|
71
|
-
| Without it | plugin fails: `cannot start the Python service` | client sees no tools |
|
|
49
|
+
## Verify
|
|
72
50
|
|
|
73
|
-
|
|
51
|
+
```bash
|
|
52
|
+
python -m foxfetch doctor # expect "ok": true
|
|
53
|
+
```
|
|
74
54
|
|
|
75
|
-
|
|
55
|
+
Then ask your agent:
|
|
76
56
|
|
|
77
57
|
```
|
|
78
58
|
foxfetch_run(js="navigator.userAgent", url="https://example.com")
|
|
79
59
|
```
|
|
80
60
|
|
|
81
|
-
|
|
82
|
-
|
|
61
|
+
It must answer with `Firefox/160.0`. If it says `Python-urllib` or `HeadlessChrome`, the agent is
|
|
62
|
+
not reaching the engine — nothing else will work until that is fixed.
|
|
83
63
|
|
|
84
|
-
> **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent:
|
|
85
|
-
>
|
|
64
|
+
> **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent: you
|
|
65
|
+
> would get the same seven tools twice (`foxfetch_run` and `mcp__foxfetch__run`).
|
|
86
66
|
|
|
87
|
-
|
|
67
|
+
## Why this exists
|
|
68
|
+
|
|
69
|
+
`curl` gets a 403. Headless Chrome gets fingerprinted. foxfetch runs the site's own JavaScript in
|
|
70
|
+
a real Firefox engine (SpiderMonkey + Necko, no window, no renderer), so the TLS handshake and
|
|
71
|
+
the JS environment are those of a real browser — and it keeps that world alive between calls.
|
|
72
|
+
When a screenshot or a click is needed, `handoff` exports the identity it earned so Chromium can
|
|
73
|
+
finish the job.
|
|
88
74
|
|
|
89
75
|
## Detailed install
|
|
90
76
|
|
|
@@ -9,31 +9,22 @@
|
|
|
9
9
|
[](https://www.npmjs.com/package/dsh-foxfetch)
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
+ Necko,无窗口、不渲染)执行站点自己的 JavaScript,过掉风控,读出只有浏览器才能看到的东西。
|
|
14
|
-
需要截图时,把它挣到的身份交给 Chromium。
|
|
12
|
+
在真 Firefox 引擎里跑页面,用来过风控;需要截图时把身份交给 Chromium。
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## 30 秒装好
|
|
19
|
-
|
|
20
|
-
**第 1 步:装服务**(每台机器装一次 —— **所有宿主都要,DSH 也不例外**)
|
|
14
|
+
## 安装
|
|
21
15
|
|
|
22
16
|
```bash
|
|
23
17
|
pip install foxfetch
|
|
24
18
|
```
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
这是服务本体,**所有宿主都要装**。然后按你用的软件二选一:
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
**第 3 步:按你的软件装** —— 只有两种情况:
|
|
33
|
-
|
|
34
|
-
### 用 DeepSeek Harness(DSH,全称 DeepSeek Harness)的
|
|
22
|
+
| 你用 | 接着执行 |
|
|
23
|
+
|---|---|
|
|
24
|
+
| **DeepSeek Harness**(DSH) | 在 `~/.dsh/profiles/desktop` 里 `pnpm add dsh-foxfetch`,再把它加进 `dsh.profile.bundles`,重启 → [步骤](#deepseek-harness) |
|
|
25
|
+
| **Pi / Claude Code / Codex / 其它 MCP 客户端** | 不用装包,只要写一段配置 → [步骤](#pi) |
|
|
35
26
|
|
|
36
|
-
|
|
27
|
+
### DSH:两条命令连起来
|
|
37
28
|
|
|
38
29
|
```powershell
|
|
39
30
|
pip install foxfetch
|
|
@@ -41,49 +32,43 @@ cd "$env:USERPROFILE\.dsh\profiles\desktop"
|
|
|
41
32
|
pnpm add dsh-foxfetch
|
|
42
33
|
```
|
|
43
34
|
|
|
44
|
-
然后把 `"dsh-foxfetch"`
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
### 用其它软件的(Pi、Claude Code、Codex、其它 MCP 客户端)
|
|
35
|
+
然后把 `"dsh-foxfetch"` 加进这个目录下 `package.json` 的 `dsh.profile.bundles`,重启 DSH。
|
|
36
|
+
完整文件内容见 [DSH 步骤](#deepseek-harness)。
|
|
48
37
|
|
|
49
|
-
|
|
38
|
+
### 其它软件:只写一段配置
|
|
50
39
|
|
|
51
40
|
```bash
|
|
52
|
-
|
|
41
|
+
pi mcp add foxfetch -- python -m foxfetch serve # Pi
|
|
42
|
+
claude mcp add foxfetch -- python -m foxfetch serve # Claude Code
|
|
53
43
|
```
|
|
54
44
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
| 软件 | 要做什么 |
|
|
58
|
-
|---|---|
|
|
59
|
-
| **Pi** | `pi mcp add foxfetch -- python -m foxfetch serve` |
|
|
60
|
-
| **Claude Code** | `claude mcp add foxfetch -- python -m foxfetch serve` |
|
|
61
|
-
| **Codex** | 在 `~/.codex/config.toml` 加 `[mcp_servers.foxfetch]` 表 → [步骤](#codex) |
|
|
62
|
-
| **其它 MCP 客户端** | `command: python`,`args: ["-m", "foxfetch", "serve"]` |
|
|
45
|
+
Codex 是在 `~/.codex/config.toml` 里加表([步骤](#codex));其它 MCP 客户端用
|
|
46
|
+
`command: python`、`args: ["-m", "foxfetch", "serve"]`。
|
|
63
47
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
| | DSH | 其它软件 |
|
|
67
|
-
|---|---|---|
|
|
68
|
-
| 靠什么加载 | 原生插件,DSH 自己加载 | MCP 配置,客户端自己读 |
|
|
69
|
-
| 要装什么包 | `pip` **和** npm | **只要** `pip` |
|
|
70
|
-
| 少装的后果 | 插件报 `cannot start the Python service` | 客户端看不到任何工具 |
|
|
48
|
+
## 验证
|
|
71
49
|
|
|
72
|
-
|
|
50
|
+
```bash
|
|
51
|
+
python -m foxfetch doctor # 应输出 "ok": true
|
|
52
|
+
```
|
|
73
53
|
|
|
74
|
-
|
|
54
|
+
然后让你的 agent 调用:
|
|
75
55
|
|
|
76
56
|
```
|
|
77
57
|
foxfetch_run(js="navigator.userAgent", url="https://example.com")
|
|
78
58
|
```
|
|
79
59
|
|
|
80
|
-
答案里必须出现 `Firefox/160.0`。如果出现 `Python-urllib` 或 `HeadlessChrome`,说明 agent
|
|
81
|
-
|
|
60
|
+
答案里必须出现 `Firefox/160.0`。如果出现 `Python-urllib` 或 `HeadlessChrome`,说明 agent 没连上
|
|
61
|
+
引擎 —— 这个问题不解决,后面全是假的。
|
|
82
62
|
|
|
83
|
-
> **一个宿主只装一个入口。** 同一个 agent 里不要既加 MCP 条目又装 DSH
|
|
84
|
-
>
|
|
63
|
+
> **一个宿主只装一个入口。** 同一个 agent 里不要既加 MCP 条目又装 DSH 插件,否则会出现两套
|
|
64
|
+
> 同样的 7 个工具(`foxfetch_run` 和 `mcp__foxfetch__run`)。
|
|
85
65
|
|
|
86
|
-
|
|
66
|
+
## 为什么需要它
|
|
67
|
+
|
|
68
|
+
`curl` 拿回来 403,无头 Chrome 被指纹识别拦掉。foxfetch 在**真 Firefox 引擎**(SpiderMonkey +
|
|
69
|
+
Necko,无窗口、不渲染)里执行站点自己的 JavaScript,所以 TLS 握手和 JS 环境都是真浏览器的,
|
|
70
|
+
而且这个环境在调用之间保持存活。需要截图或点击时,`handoff` 把挣到的身份导出来,交给 Chromium
|
|
71
|
+
完成剩下的活。
|
|
87
72
|
|
|
88
73
|
## 详细安装
|
|
89
74
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "foxfetch"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.6"
|
|
8
8
|
description = "Fetch pages through a real Firefox engine (ruyijs) for AI agents: pass bot checks, run the page's own JavaScript, then hand the identity to Chromium when a screenshot is needed."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|