Skip to content

feat(route): add toubiec wyapi netease parser#22382

Closed
JaggerH wants to merge 1 commit into
DIYgod:masterfrom
JaggerH:feature-wyapi-pr
Closed

feat(route): add toubiec wyapi netease parser#22382
JaggerH wants to merge 1 commit into
DIYgod:masterfrom
JaggerH:feature-wyapi-pr

Conversation

@JaggerH

@JaggerH JaggerH commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Involved Issue / 该 PR 相关 Issue

Close #

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

/toubiec/song/33894312/exhigh
/toubiec/search/Jay/exhigh
/toubiec/playlist/3778678/exhigh
/toubiec/album/35327877/exhigh

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 / 说明

  • Adds a Toubiec WYAPI route for resolving NetEase Cloud Music song, search, playlist, and album inputs.
  • Returns audio enclosure metadata, quality fields, and lyrics when provided by upstream.
  • Playlist mode paginates upstream playlist_trackall with limit=500&offset=...; RSS item count is controlled by query parameter limit.
  • Local verification: pnpm test lib/toubiec-wyapi.test.ts.


export const handler = (ctx: Context): Promise<Data> => {
const { mode, id, level = DEFAULT_LEVEL } = ctx.req.param();
const limit = Number.parseInt(ctx.req.query('limit') ?? String(DEFAULT_LIMIT), 10);
@github-actions

Copy link
Copy Markdown
Contributor

Auto Route Test failed, please check your PR body format and reopen pull request. Check logs for more details.
自动路由测试失败,请确认 PR 正文部分符合格式规范并重新开启,详情请检查 日志

@github-actions github-actions Bot added the auto: route no found Automated test failed due to route can not be found in PR description body label Jun 29, 2026
@github-actions github-actions Bot closed this Jun 29, 2026
@github-actions github-actions Bot added the auto: DO NOT merge Docker won’t even start label Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Auto Review

  • Rule 10 lib/routes/toubiec/wyapi.ts: songToItem is called in loops (search/playlist/album) and makes API calls (getSongUrl, getSongLyric) without using cache.tryGet(). Wrap the per-song fetch logic with cache.tryGet() from @/utils/cache to avoid redundant API calls for repeated songs.

  • Rule 13 lib/routes/toubiec/wyapi.ts: pubDate: song.time assigns a raw string without using parseDate(). Change to pubDate: song.time ? parseDate(song.time) : undefined and add import { parseDate } from '@/utils/date'.

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

Labels

auto: DO NOT merge Docker won’t even start auto: route no found Automated test failed due to route can not be found in PR description body core enhancement route

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants