Skip to content

feat(route/javdb): support category exclusion #19406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sgpublic
Copy link
Contributor

@sgpublic sgpublic commented Jun 18, 2025

Involved Issue / 该 PR 相关 Issue

Close #

Example for the Proposed Route(s) / 路由地址示例

/javdb/actors/R2Vg/d/+20,-8

New RSS Route Checklist / 新 RSS 路由检查表

  • New Route / 新的路由
  • Anti-bot or rate limit / 反爬/频率限制
    • If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
  • Date and time / 日期和时间
    • Parsed / 可以解析
    • Correct time zone / 时区正确
  • New package added / 添加了新的包
  • Puppeteer

Note / 说明

Previously, when addon_tags were changed, the response still used cached results based on the old value.

This commit fixes the issue by changing addon_tags from a query condition to a parameter.

It also enhances addon_tags to support category exclusion. +xxx means the result must include that category; -xxx means the result must not include it. A result must contain all +xxx tags and none of the -xxx tags.

Since javdb does not natively support exclusion filters, this is implemented by fetching videos in batches of 5 and filtering them manually. If the filtered results from a page are not enough to satisfy the limit, the next page will be requested until enough valid entries are collected.

Note: This may trigger javdb's anti-crawling mechanism more easily.

sgpublic added 2 commits June 18, 2025 17:08
Previously, when `addon_tags` were changed, the response still used cached results based on the old value.

This commit fixes the issue by changing `addon_tags` from a query condition to a parameter.

It also enhances `addon_tags` to support category exclusion. `+xxx` means the result must include that category; `-xxx` means the result must not include it. A result must contain all `+xxx` tags and none of the `-xxx` tags.

Since javdb does not natively support exclusion filters, this is implemented by fetching videos in batches of 5 and filtering them manually. If the filtered results from a page are not enough to satisfy the limit, the next page will be requested until enough valid entries are collected.

Note: This may trigger javdb's anti-crawling mechanism more easily.
@github-actions github-actions bot added the route label Jun 18, 2025
@sgpublic sgpublic changed the title feat(javdb): support category exclusion feat(route/javdb): support category exclusion Jun 18, 2025
Copy link
Contributor

Successfully generated as following:

http://localhost:1200/javdb/actors/R2Vg/d/+20,-8 - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>Error: this route is empty, please check the original site or &lt;a href=&quot;https://github.com/DIYgod/RSSHub/issues/new/choose&quot;&gt;create an issue&lt;/a&gt;
Route: /javdb/actors/:id/:filter?/:addon_tags?
Full Route: /javdb/actors/R2Vg/d/+20,-8
Node Version: v22.16.0
Git Hash: 659e3cf6

Copy link
Contributor

Successfully generated as following:

http://localhost:1200/javdb/actors/R2Vg/d/+20,-8 - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>Error: this route is empty, please check the original site or &lt;a href=&quot;https://github.com/DIYgod/RSSHub/issues/new/choose&quot;&gt;create an issue&lt;/a&gt;
Route: /javdb/actors/:id/:filter?/:addon_tags?
Full Route: /javdb/actors/R2Vg/d/+20,-8
Node Version: v22.16.0
Git Hash: 9b7b7766

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant