fix(route/btbtla): cover all seasons, tolerate dead rows, add lazy mode#22291
Open
JaggerH wants to merge 1 commit into
Open
fix(route/btbtla): cover all seasons, tolerate dead rows, add lazy mode#22291JaggerH wants to merge 1 commit into
JaggerH wants to merge 1 commit into
Conversation
The /detail route only handled a single exact-title match and a single quality tab, and a stale row could fail the whole feed. Changes: - Multi-season: a show listed with a season suffix (e.g. "上载新生 第三季") never matched the bare name. Now matches every search result whose title contains the query (deduped), so all seasons/variants are covered. - All quality tabs: previously only the active tab was parsed; now every tab is included and tagged via `category`. - Fault tolerance: btbtla leaves dead /tdown/ pages that 404 — magnet resolution now tolerates per-row failures and drops stale rows instead of throwing and 503-ing the feed. - Bounded concurrency: a popular show has 100+ rows across seasons; magnets are resolved with p-map (concurrency 5) + cache to avoid bursting requests. - Optional `/lazy`: resolving every magnet up front is the dominant cost for big shows. `/btbtla/detail/:name/lazy` returns the /tdown/ links unresolved for clients that resolve one magnet on demand; default stays eager so the feed carries real BT enclosures. Path param (not query) so it keys the route cache distinctly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Successfully generated as following: http://localhost:1200/btbtla/detail/雍正王朝 - Success ✔️<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>BTBTLA | 雍正王朝</title>
<link>https://www.btbtla.com/search/雍正王朝</link>
<atom:link href="http://localhost:1200/btbtla/detail/%E9%9B%8D%E6%AD%A3%E7%8E%8B%E6%9C%9D" rel="self" type="application/rss+xml"></atom:link>
<description>雍正王朝 - Powered by RSSHub</description>
<generator>RSSHub</generator>
<webMaster>contact@rsshub.app (RSSHub)</webMaster>
<language>en</language>
<lastBuildDate>Tue, 16 Jun 2026 08:37:53 GMT</lastBuildDate>
<ttl>5</ttl>
<item>
<title>雍正王朝[第42-43集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.95GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/709477216.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/709477216.html</guid>
<enclosure url="magnet:?xt=urn:btih:90f25ad0e295164e5fa122503ae2228cd47c6c26" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第40-41集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.94GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/709033272.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/709033272.html</guid>
<enclosure url="magnet:?xt=urn:btih:d36607790fdd4433ffa621dea5b5069da5610b48" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第34-35集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.96GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/705732622.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/705732622.html</guid>
<enclosure url="magnet:?xt=urn:btih:a40082f6c0f585ba6a3952df45f2941e3b02d397" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
<item>
<title>[雍正王朝][全44集][WEB-MP4/83.9G][国语中字][1080P][高分经典] [夸克网盘]</title>
<description></description>
<link>https://www.btbtla.com/pdown/3366926.html</link>
<guid isPermaLink="false">https://www.btbtla.com/pdown/3366926.html</guid>
<category>夸克网盘</category>
</item>
<item>
<title>雍正王朝[第38-39集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [3.10GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/707425290.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/707425290.html</guid>
<enclosure url="magnet:?xt=urn:btih:981f0e7d29714c022b870474933a9bfa9a873c93" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第36-37集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.91GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/706945052.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/706945052.html</guid>
<enclosure url="magnet:?xt=urn:btih:1ee448e01214a5cb64772614111011194e9ea6e2" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[全44集][国语配音+中文字幕].Yong.Zheng.Wang.Chao.1997.1080p.WEB-DL.H265.AAC-Huawei [28.83GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/245268540.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/245268540.html</guid>
<enclosure url="magnet:?xt=urn:btih:b5b2aba422cbdb0eaf872caa4c05bef7cab9b3de" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[全44集][中文字幕].Yong.Zheng.Wang.Chao.1999.Hami.WEB-DL.1080p.x264.AAC-Xiaomi [81.83GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/245262228.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/245262228.html</guid>
<enclosure url="magnet:?xt=urn:btih:554efc5ed863d1f5ec9fa921858d2f53bb1ca95e" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
</channel>
</rss>http://localhost:1200/btbtla/detail/雍正王朝/lazy - Success ✔️<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>BTBTLA | 雍正王朝</title>
<link>https://www.btbtla.com/search/雍正王朝</link>
<atom:link href="http://localhost:1200/btbtla/detail/%E9%9B%8D%E6%AD%A3%E7%8E%8B%E6%9C%9D/lazy" rel="self" type="application/rss+xml"></atom:link>
<description>雍正王朝 - Powered by RSSHub</description>
<generator>RSSHub</generator>
<webMaster>contact@rsshub.app (RSSHub)</webMaster>
<language>en</language>
<lastBuildDate>Tue, 16 Jun 2026 08:37:54 GMT</lastBuildDate>
<ttl>5</ttl>
<item>
<title>雍正王朝[第42-43集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.95GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/709477216.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/709477216.html</guid>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第40-41集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.94GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/709033272.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/709033272.html</guid>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第38-39集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [3.10GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/707425290.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/707425290.html</guid>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第36-37集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.91GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/706945052.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/706945052.html</guid>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第34-35集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.96GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/705732622.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/705732622.html</guid>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[全44集][国语配音+中文字幕].Yong.Zheng.Wang.Chao.1997.1080p.WEB-DL.H265.AAC-Huawei [28.83GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/245268540.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/245268540.html</guid>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[全44集][中文字幕].Yong.Zheng.Wang.Chao.1999.Hami.WEB-DL.1080p.x264.AAC-Xiaomi [81.83GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/245262228.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/245262228.html</guid>
<category>1080p</category>
</item>
<item>
<title>[雍正王朝][全44集][WEB-MP4/83.9G][国语中字][1080P][高分经典] [夸克网盘]</title>
<description></description>
<link>https://www.btbtla.com/pdown/3366926.html</link>
<guid isPermaLink="false">https://www.btbtla.com/pdown/3366926.html</guid>
<category>夸克网盘</category>
</item>
</channel>
</rss> |
Contributor
Auto ReviewNo clear rule violations found in the current diff. |
Contributor
|
Successfully generated as following: http://localhost:1200/btbtla/detail/雍正王朝 - Success ✔️<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>BTBTLA | 雍正王朝</title>
<link>https://www.btbtla.com/search/雍正王朝</link>
<atom:link href="http://localhost:1200/btbtla/detail/%E9%9B%8D%E6%AD%A3%E7%8E%8B%E6%9C%9D" rel="self" type="application/rss+xml"></atom:link>
<description>雍正王朝 - Powered by RSSHub</description>
<generator>RSSHub</generator>
<webMaster>contact@rsshub.app (RSSHub)</webMaster>
<language>en</language>
<lastBuildDate>Tue, 16 Jun 2026 08:39:02 GMT</lastBuildDate>
<ttl>5</ttl>
<item>
<title>雍正王朝[第36-37集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.91GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/706945052.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/706945052.html</guid>
<enclosure url="magnet:?xt=urn:btih:1ee448e01214a5cb64772614111011194e9ea6e2" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第34-35集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.96GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/705732622.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/705732622.html</guid>
<enclosure url="magnet:?xt=urn:btih:a40082f6c0f585ba6a3952df45f2941e3b02d397" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第42-43集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.95GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/709477216.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/709477216.html</guid>
<enclosure url="magnet:?xt=urn:btih:90f25ad0e295164e5fa122503ae2228cd47c6c26" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
<item>
<title>[雍正王朝][全44集][WEB-MP4/83.9G][国语中字][1080P][高分经典] [夸克网盘]</title>
<description></description>
<link>https://www.btbtla.com/pdown/3366926.html</link>
<guid isPermaLink="false">https://www.btbtla.com/pdown/3366926.html</guid>
<category>夸克网盘</category>
</item>
<item>
<title>雍正王朝[第40-41集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.94GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/709033272.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/709033272.html</guid>
<enclosure url="magnet:?xt=urn:btih:d36607790fdd4433ffa621dea5b5069da5610b48" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第38-39集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [3.10GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/707425290.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/707425290.html</guid>
<enclosure url="magnet:?xt=urn:btih:981f0e7d29714c022b870474933a9bfa9a873c93" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[全44集][中文字幕].Yong.Zheng.Wang.Chao.1999.Hami.WEB-DL.1080p.x264.AAC-Xiaomi [81.83GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/245262228.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/245262228.html</guid>
<enclosure url="magnet:?xt=urn:btih:554efc5ed863d1f5ec9fa921858d2f53bb1ca95e" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[全44集][国语配音+中文字幕].Yong.Zheng.Wang.Chao.1997.1080p.WEB-DL.H265.AAC-Huawei [28.83GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/245268540.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/245268540.html</guid>
<enclosure url="magnet:?xt=urn:btih:b5b2aba422cbdb0eaf872caa4c05bef7cab9b3de" type="application/x-bittorrent"></enclosure>
<category>1080p</category>
</item>
</channel>
</rss>http://localhost:1200/btbtla/detail/雍正王朝/lazy - Success ✔️<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>BTBTLA | 雍正王朝</title>
<link>https://www.btbtla.com/search/雍正王朝</link>
<atom:link href="http://localhost:1200/btbtla/detail/%E9%9B%8D%E6%AD%A3%E7%8E%8B%E6%9C%9D/lazy" rel="self" type="application/rss+xml"></atom:link>
<description>雍正王朝 - Powered by RSSHub</description>
<generator>RSSHub</generator>
<webMaster>contact@rsshub.app (RSSHub)</webMaster>
<language>en</language>
<lastBuildDate>Tue, 16 Jun 2026 08:39:03 GMT</lastBuildDate>
<ttl>5</ttl>
<item>
<title>雍正王朝[第42-43集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.95GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/709477216.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/709477216.html</guid>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第40-41集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.94GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/709033272.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/709033272.html</guid>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第38-39集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [3.10GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/707425290.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/707425290.html</guid>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第36-37集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.91GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/706945052.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/706945052.html</guid>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[第34-35集][国语配音+中文字幕].Yongzheng.Dynasty.S01.1999.1080p.WEB-DL.KKTV.AAC.H264-ParkTV [2.96GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/705732622.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/705732622.html</guid>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[全44集][国语配音+中文字幕].Yong.Zheng.Wang.Chao.1997.1080p.WEB-DL.H265.AAC-Huawei [28.83GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/245268540.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/245268540.html</guid>
<category>1080p</category>
</item>
<item>
<title>雍正王朝[全44集][中文字幕].Yong.Zheng.Wang.Chao.1999.Hami.WEB-DL.1080p.x264.AAC-Xiaomi [81.83GB] [1080p]</title>
<description></description>
<link>https://www.btbtla.com/tdown/245262228.html</link>
<guid isPermaLink="false">https://www.btbtla.com/tdown/245262228.html</guid>
<category>1080p</category>
</item>
<item>
<title>[雍正王朝][全44集][WEB-MP4/83.9G][国语中字][1080P][高分经典] [夸克网盘]</title>
<description></description>
<link>https://www.btbtla.com/pdown/3366926.html</link>
<guid isPermaLink="false">https://www.btbtla.com/pdown/3366926.html</guid>
<category>夸克网盘</category>
</item>
</channel>
</rss> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Involved Issue / 该 PR 相关 Issue
N/A
Example for the Proposed Route(s) / 路由地址示例
New RSS Route Checklist / 新 RSS 路由检查表
PuppeteerNote / 说明
This improves the existing
btbtla/detailroute. It previously handled only a single exact-title match and a single quality tab, and one stale row could fail the whole feed.a[title="${name}"]), so a show listed with a season suffix (e.g.上载新生 第三季) returned nothing for the bare name. It now matches every search result whose title contains the query (deduped by href), covering all seasons/variants.category./tdown/pages that return 404. The previous per-row magnet fetch threw on those, failing the entire feed. Resolution now tolerates per-row failures and drops stale rows.p-map(concurrency 5) +cache.tryGet, so refreshes are cheap (magnets are immutable) and we don't burst hundreds of requests at the site./lazymode. Resolving every magnet up front is the dominant cost for large shows./btbtla/detail/:name/lazyreturns the/tdown/page links without resolving — for clients that resolve a single magnet on demand. The default stays eager so the feed carries real BT enclosures. It is a path param (not a query string) so it keys RSSHub's route cache distinctly — the cache key is the request path, query strings are ignored.Season/quality info: quality goes into
category; the season title and detail-page URL are attached under_extra(so they don't touch the standard rendered output but remain available to structured consumers reading the raw object / JSON Feed).