foxfetch 0.1.5__tar.gz → 0.1.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: foxfetch
3
- Version: 0.1.5
3
+ Version: 0.1.7
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,82 +58,59 @@ Description-Content-Type: text/markdown
58
58
  [![npm plugin](https://img.shields.io/npm/v/dsh-foxfetch?logo=npm&label=dsh-foxfetch)](https://www.npmjs.com/package/dsh-foxfetch)
59
59
  [![License](https://img.shields.io/pypi/l/foxfetch)](LICENSE)
60
60
 
61
- `curl` gets a 403. Headless Chrome gets fingerprinted. foxfetch uses a real Firefox engine
62
- (SpiderMonkey + Necko, no window, no renderer) to run the site's own JavaScript, pass the bot
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
- **2. Check it** — should print `"ok": true`:
77
-
78
- ```bash
79
- python -m foxfetch doctor
80
- ```
81
-
82
- **3. Install for your agent** — there are only two cases:
83
-
84
- ### If you use DeepSeek Harness (DSH)
85
-
86
- Install command, run in this order:
70
+ **DSH (DeepSeek Harness) install command:**
87
71
 
88
72
  ```powershell
89
- pip install foxfetch
90
73
  cd "$env:USERPROFILE\.dsh\profiles\desktop"
91
74
  pnpm add dsh-foxfetch
92
75
  ```
93
76
 
94
- Then add `"dsh-foxfetch"` to `dsh.profile.bundles` in that `package.json` and restart DSH.
95
- Full steps with the exact file content: [DSH](#deepseek-harness).
77
+ Then add `"dsh-foxfetch"` to `dsh.profile.bundles` in that folder's `package.json` and restart
78
+ DSH.
96
79
 
97
- ### If you use anything else (Pi, Claude Code, Codex, other MCP clients)
98
-
99
- Install command — the service only, there is nothing to add per client:
80
+ **Everything else install command:**
100
81
 
101
82
  ```bash
102
- pip install foxfetch
83
+ pi mcp add foxfetch -- python -m foxfetch serve # Pi
84
+ claude mcp add foxfetch -- python -m foxfetch serve # Claude Code
103
85
  ```
104
86
 
105
- Then point that client at it:
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"]` |
113
-
114
- ### Why the two differ
87
+ Codex and other MCP clients need config only, no package — see [below](#detailed-install).
115
88
 
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 |
89
+ ## Verify
121
90
 
122
- The Python service is the same one in both cases — `pip install foxfetch` is never optional.
91
+ ```bash
92
+ python -m foxfetch doctor # expect "ok": true
93
+ ```
123
94
 
124
- **4. Prove it works** — ask your agent:
95
+ Then ask your agent:
125
96
 
126
97
  ```
127
98
  foxfetch_run(js="navigator.userAgent", url="https://example.com")
128
99
  ```
129
100
 
130
- You must see `Firefox/160.0` in the answer. If you see `Python-urllib` or `HeadlessChrome`, the
131
- agent is not talking to the engine — nothing else will work until you fix it.
101
+ It must answer with `Firefox/160.0`. If it says `Python-urllib` or `HeadlessChrome`, the agent is
102
+ not reaching the engine — nothing else will work until that is fixed.
132
103
 
133
- > **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent:
134
- > you would get the same seven tools twice (`foxfetch_run` and `mcp__foxfetch__run`).
104
+ > **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent: you
105
+ > would get the same seven tools twice (`foxfetch_run` and `mcp__foxfetch__run`).
135
106
 
136
- ---
107
+ ## Why this exists
108
+
109
+ `curl` gets a 403. Headless Chrome gets fingerprinted. foxfetch runs the site's own JavaScript in
110
+ a real Firefox engine (SpiderMonkey + Necko, no window, no renderer), so the TLS handshake and
111
+ the JS environment are those of a real browser — and it keeps that world alive between calls.
112
+ When a screenshot or a click is needed, `handoff` exports the identity it earned so Chromium can
113
+ finish the job.
137
114
 
138
115
  ## Detailed install
139
116
 
@@ -9,82 +9,59 @@
9
9
  [![npm plugin](https://img.shields.io/npm/v/dsh-foxfetch?logo=npm&label=dsh-foxfetch)](https://www.npmjs.com/package/dsh-foxfetch)
10
10
  [![License](https://img.shields.io/pypi/l/foxfetch)](LICENSE)
11
11
 
12
- `curl` gets a 403. Headless Chrome gets fingerprinted. foxfetch uses a real Firefox engine
13
- (SpiderMonkey + Necko, no window, no renderer) to run the site's own JavaScript, pass the bot
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
- **2. Check it** — should print `"ok": true`:
28
-
29
- ```bash
30
- python -m foxfetch doctor
31
- ```
32
-
33
- **3. Install for your agent** — there are only two cases:
34
-
35
- ### If you use DeepSeek Harness (DSH)
36
-
37
- Install command, run in this order:
21
+ **DSH (DeepSeek Harness) install command:**
38
22
 
39
23
  ```powershell
40
- pip install foxfetch
41
24
  cd "$env:USERPROFILE\.dsh\profiles\desktop"
42
25
  pnpm add dsh-foxfetch
43
26
  ```
44
27
 
45
- Then add `"dsh-foxfetch"` to `dsh.profile.bundles` in that `package.json` and restart DSH.
46
- Full steps with the exact file content: [DSH](#deepseek-harness).
28
+ Then add `"dsh-foxfetch"` to `dsh.profile.bundles` in that folder's `package.json` and restart
29
+ DSH.
47
30
 
48
- ### If you use anything else (Pi, Claude Code, Codex, other MCP clients)
49
-
50
- Install command — the service only, there is nothing to add per client:
31
+ **Everything else install command:**
51
32
 
52
33
  ```bash
53
- pip install foxfetch
34
+ pi mcp add foxfetch -- python -m foxfetch serve # Pi
35
+ claude mcp add foxfetch -- python -m foxfetch serve # Claude Code
54
36
  ```
55
37
 
56
- Then point that client at it:
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"]` |
64
-
65
- ### Why the two differ
38
+ Codex and other MCP clients need config only, no package — see [below](#detailed-install).
66
39
 
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 |
40
+ ## Verify
72
41
 
73
- The Python service is the same one in both cases — `pip install foxfetch` is never optional.
42
+ ```bash
43
+ python -m foxfetch doctor # expect "ok": true
44
+ ```
74
45
 
75
- **4. Prove it works** — ask your agent:
46
+ Then ask your agent:
76
47
 
77
48
  ```
78
49
  foxfetch_run(js="navigator.userAgent", url="https://example.com")
79
50
  ```
80
51
 
81
- You must see `Firefox/160.0` in the answer. If you see `Python-urllib` or `HeadlessChrome`, the
82
- agent is not talking to the engine — nothing else will work until you fix it.
52
+ It must answer with `Firefox/160.0`. If it says `Python-urllib` or `HeadlessChrome`, the agent is
53
+ not reaching the engine — nothing else will work until that is fixed.
83
54
 
84
- > **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent:
85
- > you would get the same seven tools twice (`foxfetch_run` and `mcp__foxfetch__run`).
55
+ > **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent: you
56
+ > would get the same seven tools twice (`foxfetch_run` and `mcp__foxfetch__run`).
86
57
 
87
- ---
58
+ ## Why this exists
59
+
60
+ `curl` gets a 403. Headless Chrome gets fingerprinted. foxfetch runs the site's own JavaScript in
61
+ a real Firefox engine (SpiderMonkey + Necko, no window, no renderer), so the TLS handshake and
62
+ the JS environment are those of a real browser — and it keeps that world alive between calls.
63
+ When a screenshot or a click is needed, `handoff` exports the identity it earned so Chromium can
64
+ finish the job.
88
65
 
89
66
  ## Detailed install
90
67
 
@@ -9,81 +9,56 @@
9
9
  [![npm plugin](https://img.shields.io/npm/v/dsh-foxfetch?logo=npm&label=dsh-foxfetch)](https://www.npmjs.com/package/dsh-foxfetch)
10
10
  [![License](https://img.shields.io/pypi/l/foxfetch)](LICENSE)
11
11
 
12
- `curl` 拿回来 403,无头 Chrome 被指纹识别拦掉。foxfetch 用**真的 Firefox 引擎**(SpiderMonkey
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
- **第 2 步:自检** —— 应该打印 `"ok": true`
27
-
28
- ```bash
29
- python -m foxfetch doctor
30
- ```
31
-
32
- **第 3 步:按你的软件装** —— 只有两种情况:
33
-
34
- ### 用 DeepSeek Harness(DSH,全称 DeepSeek Harness)的
35
-
36
- 安装指令,按顺序执行:
20
+ **DSH(DeepSeek Harness)安装指令:**
37
21
 
38
22
  ```powershell
39
- pip install foxfetch
40
23
  cd "$env:USERPROFILE\.dsh\profiles\desktop"
41
24
  pnpm add dsh-foxfetch
42
25
  ```
43
26
 
44
- 然后把 `"dsh-foxfetch"` 加进那个 `package.json` 里的 `dsh.profile.bundles`,重启 DSH。
45
- 带完整文件内容的步骤:[DSH 详细安装](#deepseek-harness)。
27
+ 再把 `"dsh-foxfetch"` 加进该目录 `package.json` 的 `dsh.profile.bundles`,重启 DSH。
46
28
 
47
- ### 用其它软件的(Pi、Claude Code、Codex、其它 MCP 客户端)
48
-
49
- 安装指令 —— **只装服务,客户端那边不用装任何包**:
29
+ **其余软件安装指令:**
50
30
 
51
31
  ```bash
52
- pip install foxfetch
32
+ pi mcp add foxfetch -- python -m foxfetch serve # Pi
33
+ claude mcp add foxfetch -- python -m foxfetch serve # Claude Code
53
34
  ```
54
35
 
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"]` |
63
-
64
- ### 为什么两边不一样
36
+ Codex 和其它 MCP 客户端只写配置、不装包,见[下文](#详细安装)。
65
37
 
66
- | | DSH | 其它软件 |
67
- |---|---|---|
68
- | 靠什么加载 | 原生插件,DSH 自己加载 | MCP 配置,客户端自己读 |
69
- | 要装什么包 | `pip` **和** npm | **只要** `pip` |
70
- | 少装的后果 | 插件报 `cannot start the Python service` | 客户端看不到任何工具 |
38
+ ## 验证
71
39
 
72
- 两种情况的 **Python 服务是同一个** —— `pip install foxfetch` 永远不能省。
40
+ ```bash
41
+ python -m foxfetch doctor # 应输出 "ok": true
42
+ ```
73
43
 
74
- **第 4 步:验证真的通了** —— 让你的 agent 调用
44
+ 然后让你的 agent 调用:
75
45
 
76
46
  ```
77
47
  foxfetch_run(js="navigator.userAgent", url="https://example.com")
78
48
  ```
79
49
 
80
- 答案里必须出现 `Firefox/160.0`。如果出现 `Python-urllib` 或 `HeadlessChrome`,说明 agent
81
- 根本没连上引擎 —— 先把这个问题解决,否则后面全是假的。
50
+ 答案里必须出现 `Firefox/160.0`。如果出现 `Python-urllib` 或 `HeadlessChrome`,说明 agent 没连上
51
+ 引擎 —— 这个问题不解决,后面全是假的。
82
52
 
83
- > **一个宿主只装一个入口。** 同一个 agent 里不要既加 MCP 条目又装 DSH 插件:
84
- > 那样会出现两套同样的 7 个工具(`foxfetch_run` 和 `mcp__foxfetch__run`),模型得靠猜。
53
+ > **一个宿主只装一个入口。** 同一个 agent 里不要既加 MCP 条目又装 DSH 插件,否则会出现两套
54
+ > 同样的 7 个工具(`foxfetch_run` 和 `mcp__foxfetch__run`)。
85
55
 
86
- ---
56
+ ## 为什么需要它
57
+
58
+ `curl` 拿回来 403,无头 Chrome 被指纹识别拦掉。foxfetch 在**真 Firefox 引擎**(SpiderMonkey +
59
+ Necko,无窗口、不渲染)里执行站点自己的 JavaScript,所以 TLS 握手和 JS 环境都是真浏览器的,
60
+ 而且这个环境在调用之间保持存活。需要截图或点击时,`handoff` 把挣到的身份导出来,交给 Chromium
61
+ 完成剩下的活。
87
62
 
88
63
  ## 详细安装
89
64
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "foxfetch"
7
- version = "0.1.5"
7
+ version = "0.1.7"
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"
@@ -1,5 +1,5 @@
1
1
  """foxfetch: read pages through a real Firefox engine when plain HTTP is not enough."""
2
2
 
3
- __version__ = "0.1.5"
3
+ __version__ = "0.1.7"
4
4
 
5
5
  __all__ = ["__version__"]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes