正确性修复: - 修复 Sec-Ch-Ua 构造 bug: 原实现产出 ""Not_A Brand";v="99"" 双重引号 畸形头(Chrome/Edge 两路径), 严格校验的 WAF 会忽略; 改为品牌数组拼接 - search 403 快速失败: 实例级 403 不再退避重试(~10.5s 空等), 立即 failover - AdaptiveThrottle: --throttle-failure-threshold 0 现为真正禁用语义 - number_of_results 缺失时用 len(results) 兜底(JSON/HTML 路径契约对齐) - 版本对齐: pyproject.toml 与 _config.py 同步 2.5.0 AI 代理体验: - fetch.py --extract json: 结构化骨架(title/meta/headings/links/images) - fetch.py --max-chars N: 提取后语义级截断(区别于 --max-size 字节截断) - search --fetch-total-chars N: --fetch 全局字符预算, 耗尽后 status=skipped - --dedup-fetched-content: 抓取正文 SimHash 去重, status=duplicate - --progress 新增 angle_start/ok/fail + fetch_skip/fetch_duplicate 事件 - fetch.py 补齐 --log-format json + --dump-schema - CSV 媒体列自适应(images/videos 类别自动追加媒体字段列) - --dry-run 批量模式打印实际查询列表 - search 连接复用: requests 可用时走模块级 Session(连接池) 工程治理: - 新增 scripts/release_check.py 发布一致性检查(版本/错误码表漂移) - 新增 tests/test_v250_features.py 46+4 个回归测试(全量 622 通过) - tests/conftest.py: autouse fixture 强制 stdlib 路径(本机有 requests 时 既有 urllib mock 测试不失效)
43 lines
1.3 KiB
TOML
43 lines
1.3 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=61.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "searxng-use-cli"
|
|
version = "2.5.0"
|
|
description = "Privacy-respecting SearXNG search + web-fetch CLI toolkit for AI agents"
|
|
readme = "README.md"
|
|
license = { text = "MIT" }
|
|
requires-python = ">=3.8"
|
|
keywords = ["searxng", "search", "web-scraping", "ai-agent", "cli", "privacy"]
|
|
classifiers = [
|
|
"Environment :: Console",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
]
|
|
dependencies = []
|
|
|
|
[project.optional-dependencies]
|
|
fetch = ["requests", "beautifulsoup4"]
|
|
toml = ["tomli; python_version < '3.11'"]
|
|
all = ["requests", "beautifulsoup4", "tomli; python_version < '3.11'"]
|
|
test = ["pytest", "requests", "beautifulsoup4"]
|
|
|
|
[project.scripts]
|
|
searxng-search = "scripts.search:main"
|
|
searxng-fetch = "scripts.fetch:main"
|
|
|
|
[tool.setuptools]
|
|
packages = ["scripts"]
|
|
|
|
[tool.setuptools.package-data]
|
|
scripts = ["*.py"]
|