@jayyuen66/dsh-scrapling 0.1.2 → 0.1.4
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.
- package/CHANGELOG.md +83 -0
- package/README.md +141 -19
- package/README.zh-CN.md +141 -19
- package/THIRD_PARTY_NOTICES.md +20 -2
- package/bin/dsh-scrapling.mjs +13 -0
- package/client.js +11 -3
- package/cordis.patch.yml +1 -1
- package/host.js +40 -36
- package/package.json +26 -9
- package/py/adapters.py +763 -267
- package/py/bridge.py +27 -4
- package/py/crawl.py +640 -90
- package/py/extraction.py +400 -0
- package/py/guard.py +120 -27
- package/py/media.py +474 -0
- package/py/redact.py +118 -0
- package/py/redis_storage.py +129 -0
- package/py/runtime-requirements.txt +49 -0
- package/py/search.py +404 -0
- package/py/session_page.py +240 -0
- package/runtime-manifest.json +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jayyuen66/dsh-scrapling",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Scrapling 网页抓取插件(dsh):静态/浏览器抓取 + CSS/XPath 结构化抽取 + 选择器自愈 + capture_xhr 与会话网络历史 + 登录态存取 + Spider 爬虫,由常驻 Python 进程驱动。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -20,15 +20,27 @@
|
|
|
20
20
|
"type": "git",
|
|
21
21
|
"url": "git+https://github.com/JayYuen666/dsh-scrapling.git"
|
|
22
22
|
},
|
|
23
|
+
"bin": {
|
|
24
|
+
"dsh-scrapling": "./bin/dsh-scrapling.mjs"
|
|
25
|
+
},
|
|
23
26
|
"files": [
|
|
24
27
|
"icon.svg",
|
|
28
|
+
"bin/dsh-scrapling.mjs",
|
|
25
29
|
"host.js",
|
|
26
30
|
"client.js",
|
|
27
31
|
"cordis.patch.yml",
|
|
32
|
+
"runtime-manifest.json",
|
|
28
33
|
"py/crawl.py",
|
|
29
34
|
"py/bridge.py",
|
|
30
35
|
"py/adapters.py",
|
|
31
36
|
"py/guard.py",
|
|
37
|
+
"py/extraction.py",
|
|
38
|
+
"py/search.py",
|
|
39
|
+
"py/session_page.py",
|
|
40
|
+
"py/media.py",
|
|
41
|
+
"py/redact.py",
|
|
42
|
+
"py/redis_storage.py",
|
|
43
|
+
"py/runtime-requirements.txt",
|
|
32
44
|
"CHANGELOG.md",
|
|
33
45
|
"THIRD_PARTY_NOTICES.md"
|
|
34
46
|
],
|
|
@@ -50,6 +62,7 @@
|
|
|
50
62
|
"registry": "https://registry.npmjs.org"
|
|
51
63
|
},
|
|
52
64
|
"dependencies": {
|
|
65
|
+
"@modelcontextprotocol/sdk": "1.32.2",
|
|
53
66
|
"ipaddr.js": "2.5.0"
|
|
54
67
|
},
|
|
55
68
|
"devDependencies": {
|
|
@@ -82,6 +95,7 @@
|
|
|
82
95
|
"@deepseek-ai/dsh-subprocess": "0.2.1-rc.3",
|
|
83
96
|
"@deepseek-ai/dsh-system-prompt": "0.2.1-rc.3",
|
|
84
97
|
"@deepseek-ai/dsh-tools": "0.2.1-rc.3",
|
|
98
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.3",
|
|
85
99
|
"@deepseek-ai/dsh-user-approval": "0.2.1-rc.3",
|
|
86
100
|
"@deepseek-ai/dsh-web": "0.2.1-rc.3",
|
|
87
101
|
"@deepseek-ai/schemastery": "3.18.5",
|
|
@@ -103,6 +117,7 @@
|
|
|
103
117
|
"@deepseek-ai/dsh": "^0.2.1-rc.3",
|
|
104
118
|
"@deepseek-ai/dsh-output-retention": "0.2.1-rc.3",
|
|
105
119
|
"@deepseek-ai/dsh-tools": "0.2.1-rc.3",
|
|
120
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.3",
|
|
106
121
|
"@deepseek-ai/dsh-web": "0.2.1-rc.3",
|
|
107
122
|
"@deepseek-ai/schemastery": "3.18.5"
|
|
108
123
|
},
|
|
@@ -131,23 +146,25 @@
|
|
|
131
146
|
},
|
|
132
147
|
"scripts": {
|
|
133
148
|
"build:client": "node build-client.ts",
|
|
134
|
-
"build": "node build-host.ts",
|
|
149
|
+
"build": "node build-host.ts && node build-cli.ts",
|
|
135
150
|
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.client.json",
|
|
136
151
|
"lint": "oxlint .",
|
|
137
152
|
"test": "vitest run --coverage",
|
|
138
153
|
"test:watch": "vitest",
|
|
139
154
|
"check": "npm run --loglevel=warn typecheck && npm run --loglevel=warn lint && npm run --loglevel=warn build:client && npm run --loglevel=warn build && npm run --loglevel=warn test && npm run --loglevel=warn fmt:check && npm run --loglevel=warn check:py",
|
|
140
155
|
"fmt:check": "oxfmt --check .",
|
|
141
|
-
"py": "
|
|
142
|
-
"py:which": "
|
|
143
|
-
"face:py": "
|
|
156
|
+
"py": "node py-launcher.mjs",
|
|
157
|
+
"py:which": "node py-launcher.mjs --which",
|
|
158
|
+
"face:py": "node face-py.mjs",
|
|
144
159
|
"lint:py": "npm run --loglevel=warn py -- -m ruff check py/",
|
|
145
160
|
"fmt:py": "npm run --loglevel=warn py -- -m ruff format --check py/",
|
|
146
161
|
"typecheck:py": "npm run --loglevel=warn py -- -m mypy py/",
|
|
147
162
|
"test:py": "npm run --loglevel=warn py -- py/tests/test_bridge.py",
|
|
148
|
-
"bandit:py": "npm run --loglevel=warn py -- -m bandit -q -
|
|
149
|
-
"cov:py": "
|
|
150
|
-
"coverage:floor": "
|
|
151
|
-
"
|
|
163
|
+
"bandit:py": "npm run --loglevel=warn py -- -m bandit -q -r py/",
|
|
164
|
+
"cov:py": "node py-launcher.mjs -m coverage erase && node py-launcher.mjs --env=DSH_PY_COVERAGE=1 -m coverage run --parallel-mode py/tests/test_bridge.py && node py-launcher.mjs -m coverage combine && node py-launcher.mjs -m coverage report -m && node py-launcher.mjs -m coverage erase",
|
|
165
|
+
"coverage:floor": "node py-launcher.mjs -m coverage erase && node py-launcher.mjs --env=DSH_PY_COVERAGE=1 -m coverage run --parallel-mode py/tests/test_bridge.py && node py-launcher.mjs -m coverage combine && node py-launcher.mjs -m coverage report --omit=\"py/tests/*\" --fail-under=74 && node -e \"require('node:fs').mkdirSync('coverage',{recursive:true})\" && node py-launcher.mjs -m coverage json --omit=\"py/tests/*\" -o coverage/python-coverage.json && node coverage-floor.mjs && node py-launcher.mjs -m coverage erase",
|
|
166
|
+
"deps:py": "node deps-check.mjs",
|
|
167
|
+
"check:py": "npm run --loglevel=warn py:which && npm run --loglevel=warn face:py && npm run --loglevel=warn deps:py && npm run --loglevel=warn lint:py && npm run --loglevel=warn fmt:py && npm run --loglevel=warn typecheck:py && npm run --loglevel=warn test:py && npm run --loglevel=warn bandit:py && npm run --loglevel=warn coverage:floor",
|
|
168
|
+
"build:cli": "node build-cli.ts"
|
|
152
169
|
}
|
|
153
170
|
}
|