jxxghp
a0e27c4424
feat(indexer): map Piggo resource labels
...
Resolve site labels from the Piggo catalog and dispatch connectivity, ticket parsing, and throttling through indexer capabilities.
2026-11-12 06:45:16 +08:00
jxxghp
18fe2ea387
feat(indexer): support HDArea REST API
...
Refs #7370
2026-11-11 21:53:16 +08:00
jxxghp
8dc4b08114
fix(indexer): support Piggo laboratory API ( #7274 )
2026-11-11 18:32:59 +08:00
gntv456
6166968f4c
feat(indexer): 支持 FluxTorrent 兼容层站点搜索与用户数据 ( #7355 )
...
* feat(indexer): 支持 FluxTorrent 兼容层站点搜索与用户数据
好学(hxpt.org)已由 NexusPHP 迁移到 FluxTorrent,原有页面刮削全部失效。
FluxTorrent 提供 /api/v1/compat/nexusphp/* 只读 JSON 兼容层,本提交按该契约
新增索引器与用户数据解析器,并在分发层加入能力探测,使未在站点资源中登记
专站协议的站点也能被自动识别(站点清单是闭源发布资源,主仓无法新增条目)。
- 新增 FluxTorrentSpider:调用兼容层 torrents.json 搜索,按 category_newznab
映射媒体类型,按 promotion 换算下载与上传量系数,下载地址携带开放 API 令牌
- 新增 FluxTorrentSiteUserInfo:解析兼容层 user.json 的用户资料与流量
- 新增同步与异步能力探测:站点未登记专站协议时,用站点令牌请求一次
user.json,响应符合 {code, message, data, request_id} 信封即判定为 FluxTorrent
- 探测要求站点已配置令牌,并用命中 24 小时、未命中 30 分钟的双层 TTL 缓存
- 不下发分类与媒体类型筛选:兼容层的 category 只接受站内分类 ID,且客户端
过滤会破坏分页续拉契约,分类筛选待站点资源发布链路补齐后再放开
* fix(indexer): 抽出用户数据模型解析,消除复杂度增长
CI 复杂度门禁报 IndexerModule.refresh_userdata 圈复杂度 15->16(上限 15)。
把 FluxTorrent 能力探测与模型选择抽成模块级函数 _resolve_userdata_schema,
refresh_userdata 的方法体不再因新增分支而增长。
* refactor(indexer): FluxTorrent 模块文件改为单词命名
命名门禁 test_new_host_production_modules_use_single_word_filenames 要求
app 下的模块文件名满足 [a-z][a-z0-9]*,flux_torrent.py 不合规 ⇒ 两个模块
改名为 fluxtorrent.py,同步更新导入与测试打桩路径。
* test(indexer): 修正发布时间断言并同步架构依赖基线
- 发布时间断言原先写死本机时区渲染结果,在 UTC 的 CI 上必然失败 ⇒ 改为对同一
转换函数取期望值,只验证 Unix 时间戳经由 format_timestamp 输出
- dependency-baseline.json 新增 app.modules.indexer.spider.fluxtorrent 与
app.modules.indexer.parser.fluxtorrent 的模块与导入边(edge_count 9973→9990、
module_count 1151→1153),结构与既有 haidan 等专站模块一致,边界未越权
* docs(architecture): 同步架构快照的模块与导入边数量
架构依赖基线新增两个索引器模块后,docs/architecture-overview.md 的
快照表需同步:Python 模块 1151→1153、内部导入边 9,973→9,990。
* test(indexer): 补齐异步探测与失败路径用例,满足新文件覆盖率门槛
新增文件的覆盖率低水位要求 80%,补齐后 spider 90.81%、parser 92.21%:
- 异步能力探测命中与请求异常两条路径
- 站点无响应、响应不是 JSON 时的降级判定
- 异步搜索缺少令牌时的直接失败
- 用户接口空响应 / 非 JSON / 结构异常 / 业务错误码的错误信息
- 站点地址缺协议与空白地址的归一
* test(indexer): 覆盖协议解析的三条分支
存量文件覆盖率低水位要求未覆盖语句数不增长,补齐协议解析的已登记协议、
探测命中、未识别三种情况(同步与异步),以及用户数据模型名的两条分支。
* refactor(indexer): 按站点资源路由 FluxTorrent 协议
删除运行时能力探测与 TTL 缓存,搜索和用户数据直接使用站点资源声明的 parser/schema;保留 FluxTorrent spider 与用户数据解析器的注册,由站点构建配置决定路由。
---------
Co-authored-by: gntv456 <gntv456@users.noreply.github.com >
Co-authored-by: jxxghp <jxxghp@gmail.com >
2026-11-11 10:27:52 +08:00
jxxghp
a87c005322
fix(indexer): parse cspt dashboard traffic metrics
2026-11-04 14:30:50 +08:00
jxxghp
4d32f25fe4
fix(indexer): honor HDDolby API resource URL ( #7158 )
2026-10-23 17:48:59 +08:00
Aqr-K
598d1663b1
fix(download): preserve protocol failures and isolate site updates ( #7143 )
...
* fix(download): preserve protocol failures and isolate site updates
* test: cover tracker token lifecycle and record dependency facts
---------
Co-authored-by: jxxghp <jxxghp@gmail.com >
2026-10-23 07:22:22 +08:00
jxxghp
6d4ce83837
fix(types): clear host mypy debt and prevent typing regressions
...
严格检查全部宿主源码,清零类型错误预算并移除按模块类型豁免。
按原因、所属方法、错误码及语法指纹锁定必要兼容例外和站点类型桩,
CI 阻断新增忽略、检查范围退化、本地桩替代真实接口及新的类型错误。
修复空值、异步和供应方类型边界,保持插件与 API 兼容合同,
并补充存储、订阅、通知、Agent 和工作流边界的回归覆盖。
2026-10-21 22:03:18 +08:00
jxxghp
842320a22c
fix(site): preserve MTorrent role names and nullable share ratios
2026-10-20 15:39:06 +08:00
DDSRem
e0642eafa7
chore(types): reduce v3 host mypy debt ( #7057 )
...
* chore(types): clear AniList endpoint mypy debt
* chore(types): clear Douban endpoint mypy debt
* chore(types): clear recommendation endpoint mypy debt
* chore(types): clear subscription notification mypy debt
* chore(types): clear SDK string compatibility mypy debt
* chore(types): ratchet v3 host mypy across remaining files
* chore(types): reduce v3 host mypy debt and retire ledger
* chore(types): reconcile host snapshot with upstream HTTP pool
* test(types): cover host paths exposed by mypy cleanup
2026-10-18 09:37:49 +08:00
DDSRem
2de976f6b3
Merge pull request #7050 from DDSRem-Dev/codex-comment-migration
...
docs: 统一全项目中文注释和结构化契约说明
2026-10-17 19:26:29 +08:00
jxxghp
13ab2f5e9e
fix: type Rousi unread message parser
2026-10-17 13:36:25 +08:00
jxxghp
87674768a9
fix(types): govern Bitpt user data contract
2026-10-17 07:15:40 +08:00
jxxghp
031d5dec3d
fix(types): govern Zhixing user data contract
2026-10-17 07:00:08 +08:00
jxxghp
bbca548a43
docs(types): remove obsolete parser compatibility note
2026-10-17 01:19:05 +08:00
jxxghp
89bf47c061
refactor(types): align shared contracts for zhixing site parser
2026-10-17 01:18:54 +08:00
jxxghp
62ef4bf51a
refactor(types): govern yema site parser
2026-10-17 01:18:52 +08:00
jxxghp
a4710b434d
refactor(types): govern unit3d site parser
2026-10-17 01:18:49 +08:00
jxxghp
767aa8896f
refactor(types): govern torrent_leech site parser
2026-10-17 01:18:47 +08:00
jxxghp
d82f30a43f
refactor(types): govern tnode site parser
2026-10-17 01:18:45 +08:00
jxxghp
18dd8d23cf
refactor(types): align shared contracts for sunnypt site parser
2026-10-17 01:18:42 +08:00
jxxghp
5523a3db8e
refactor(types): govern small_horse site parser
2026-10-17 01:18:40 +08:00
jxxghp
13a0b2e7a2
refactor(types): align shared contracts for rousi site parser
2026-10-17 01:18:38 +08:00
jxxghp
1ed776333e
refactor(types): govern nexus_rabbit site parser
2026-10-17 01:18:35 +08:00
jxxghp
2bec21864d
refactor(types): govern nexus_project site parser
2026-10-17 01:18:32 +08:00
jxxghp
66a5d81109
refactor(types): govern nexus_php site parser
2026-10-17 01:18:30 +08:00
jxxghp
92f2990c52
refactor(types): govern nexus_hhanclub site parser
2026-10-17 01:18:28 +08:00
jxxghp
1eaef2aee8
refactor(types): govern nexus_audiences site parser
2026-10-17 01:18:26 +08:00
jxxghp
9d36adce97
refactor(types): govern mtorrent site parser
2026-10-17 01:18:23 +08:00
jxxghp
9844b80884
refactor(types): govern ipt site parser
2026-10-17 01:18:20 +08:00
jxxghp
dc83ab9adf
refactor(types): govern hddolby site parser
2026-10-17 01:18:17 +08:00
jxxghp
9b35d01582
refactor(types): govern gazelle site parser
2026-10-17 01:18:15 +08:00
jxxghp
1e7dd5d864
refactor(types): govern file_list site parser
2026-10-17 01:18:12 +08:00
jxxghp
8de055c73e
refactor(types): govern discuz site parser
2026-10-17 01:18:10 +08:00
jxxghp
8fceb4d40f
refactor(types): align shared contracts for bitpt site parser
2026-10-17 01:18:08 +08:00
jxxghp
1006c709d8
refactor(types): govern shared site parser contracts
2026-10-17 01:14:46 +08:00
Opportunity
5482415697
fix(indexer): normalize Audiences user levels ( #7027 )
2026-10-16 22:08:02 +08:00
Opportunity
b8eb66521b
fix(indexer): 修复 NexusPHP 用户流量详情表格兜底解析 ( #7008 )
2026-10-15 20:30:23 +08:00
Opportunity
5e476e2419
fix(indexer): 修复 Discuz 用户分享率解析 ( #7006 )
2026-10-15 13:01:57 +08:00
jxxghp
99ef7e508b
fix(indexer): support custom seeding and Unit3D bonus pages
2026-10-12 08:36:19 +08:00
freeman
f3ad81b39e
style: apply safe ruff auto-fixes and exempt startup late imports
...
Run `ruff check app tests scripts --fix` with the configured rule set
(E4/E7/E9/F/I): import sorting (I001), f-strings without placeholders
(F541), lambda/variable/unused-import cleanups that ruff marks safe.
Nine files whose only ruff debt sits next to pre-existing pylint
import-resolution errors (lazy exports, sys.path script imports) or
whose "unused" imports are reached through attribute access by tests are
left untouched so the changed-file pylint gate and the benchmark tests
stay green; their diagnostics remain in the baseline.
app/startup/lifecycle/__init__.py and app/main.py import business
modules after cache composition, import-path and stdio setup on purpose
(the source comments document the contract), so declare E402
per-file-ignores for them instead of adding per-line noqa.
Ruff ratchet watermark drops from 498 to 100; sync the baseline fixture
and the optimization checklist figure.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com >
2026-10-09 13:29:09 +08:00
jxxghp
43edef140f
fix(indexer): fetch TNode current user before requiring an id ( #6895 )
2026-10-06 07:40:06 +08:00
jxxghp
97b251ed72
chore(parser): preserve existing ruff baseline
2026-10-02 17:04:41 +08:00
jxxghp
e1d1de1ee7
fix(parser): keep Unit3D username as user id
2026-10-02 17:00:41 +08:00
jxxghp
05a53657a6
fix(indexer): parse PterClub seeding stats
2026-09-23 16:15:19 +08:00
jxxghp
1422f41c6c
fix(indexer): paginate M-Team seeding statistics
2026-09-23 15:45:52 +08:00
jxxghp
aeaf473ebd
fix(indexer): support UUID user ids and fix hhanclub bonus ( #6753 , #6754 )
...
- NexusPHP v1.10+ 站点以 userdetails.php?uuid= 标识用户,解析 UUID 用户标识,
做种列表接口改用 useruuid 参数请求
- 憨憨等站点的魔力值嵌在 mybonus 链接内部,优先解析链接文本与链接后文本,
兜底容器限制为临近且文本紧凑,避免误取公告等大段文本中的无关数字
2026-09-22 13:35:43 +08:00
Opportunity
3114161166
fix(indexer): parse common PTTime user level ( #6757 )
2026-09-22 11:24:05 +08:00
moviepilot-codex[bot]
36e2e42fda
fix(indexer): preserve parser type ratchet
2026-09-21 19:11:32 +08:00
moviepilot-codex[bot]
1ab94877d7
fix(indexer): parse PTTTime user data correctly
2026-09-21 18:55:59 +08:00