Commit Graph

39 Commits

Author SHA1 Message Date
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
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
1006c709d8 refactor(types): govern shared site parser contracts 2026-10-17 01:14:46 +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
jxxghp
43edef140f fix(indexer): fetch TNode current user before requiring an id (#6895) 2026-10-06 07:40:06 +08:00
HDDolby
4a22760bb4 Skip requests when userid invalid (#6723) 2026-09-18 10:35:58 +08:00
jxxghp
92e745fc97 refactor(architecture): split chain owners and close runtime boundaries 2026-08-28 22:26:19 +08:00
jxxghp
9e81421eba fix(indexer): close quality ratchet regression 2026-08-26 22:53:36 +08:00
InfinityPacer
d24c52ea97 fix(plugin): 按绑定仓库处理插件更新 (#6472) 2026-08-26 21:35:16 +08:00
jxxghp
9dbe424c3d refactor(config): retire RuntimeSettingsCompat host usage 2026-08-26 15:55:21 +08:00
jxxghp
55c80c87da refactor: route indexer module settings through runtime 2026-08-23 03:15:21 +08:00
jxxghp
96118e73e7 refactor(string): split utilities by responsibility 2026-08-15 08:03:55 +08:00
jxxghp
369d7d6448 refactor: reorganize backend module boundaries 2026-08-14 19:53:33 +08:00
jxxghp
7b3444c366 refactor backend module architecture 2026-08-14 15:45:38 +08:00
mustangpt
51d2ed1200 feat: support YemaPT Open API (#6227) 2026-08-03 07:01:21 +08:00
jxxghp
3dde94be0f feat: support SunnyPT API indexer 2026-07-23 14:04:07 +08:00
jxxghp
4de4044a3e feat: accelerate RSS parsing with Rust 2026-05-22 21:31:18 +08:00
jxxghp
bd4d493f34 feat: add Rust acceleration for core parsing 2026-05-22 19:58:04 +08:00
PKC278
cb3cef70e5 feat: 新增 RousiPro 站点支持 2026-01-09 22:08:24 +08:00
Reaper
1867f5e7c2 增加知行 极速之星 框架解析 2025-10-02 04:27:35 +08:00
jxxghp
6873de7243 fix async 2025-07-31 13:32:47 +08:00
jxxghp
23c9862eb3 fix site parser 2025-06-27 12:26:17 +08:00
jxxghp
0baf6e5fe7 fix SiteParser close session 2025-06-27 08:38:02 +08:00
awsl1110
312933a259 fix(indexer): 修正 DiscuzX 站点名称
- 将 Discuz! 站点名称修改为 DiscuzX
2025-05-31 19:18:25 +08:00
jxxghp
f9b0db623d fix cython type error 2025-03-23 21:39:37 +08:00
jxxghp
147d980c54 fix hddolby 2025-03-02 08:51:09 +08:00
jxxghp
c302013696 add hddolby api 2025-03-01 21:24:01 +08:00
InfinityPacer
2e7e74c803 feat(encoding): update configuration to performance mode 2024-11-27 13:52:17 +08:00
InfinityPacer
83fc474dbe feat(encoding): enhance encoding detection with confidence threshold 2024-11-27 12:33:57 +08:00
jxxghp
d6f5160959 fix mteam 消息99999 2024-11-16 19:55:41 +08:00
jxxghp
aafb2bc269 fix #3071 增加站点消息开关 2024-11-12 13:59:13 +08:00
jxxghp
c6abb1f9f1 fix 站点数据刷新 2024-09-26 14:00:10 +08:00
jxxghp
63ca5ee313 add storage 2024-06-30 08:59:12 +08:00
jxxghp
77632880d1 add site parsers 2024-06-30 08:09:23 +08:00