feat(route/1lou): add keyword search route#22660
Open
JaggerH wants to merge 1 commit into
Open
Conversation
1lou.me exposes a GET keyword search at search.htm?keyword=<kw> whose results are the same li.media.thread.tap markup as the forum listings, so the existing listing+detail parse applies unchanged. Extract that parse into util.ts (fetchThreads) and reuse it from both the generic route and a new /search/:keyword route (keyword as a path param). Verified: /1lou/search/奥本海默 returns 20 threads with .torrent enclosures.
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
Close #
Example for the Proposed Route(s) / 路由地址示例
New RSS Route Checklist / 新 RSS 路由检查表
PuppeteerNote / 说明
Adds a keyword search route for 1lou (BT 之家). The site exposes a plain GET search at
https://www.1lou.me/search.htm?keyword=<keyword>, and its result rows use the exact sameli.media.thread.tapmarkup as the forum listings that the existing/1lou/:paramsroute already parses.To avoid duplicating that listing + per-thread detail parse, I extracted it into
lib/routes/1lou/util.ts(fetchThreads) and reuse it from both the existing generic route and the new/search/:keywordroute. The keyword is a path parameter (not a custom query parameter). Detail fetches usecache.tryGet, dates go throughparseDate+timezone(+8), and each item carries its.torrentenclosure.Verified:
/1lou/search/奥本海默returns 20 threads, each with a.torrentenclosure.