Skip to content
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

fix(youtube): check if username exists #18025

Merged
merged 2 commits into from
Jan 1, 2025
Merged

Conversation

TonyRL
Copy link
Collaborator

@TonyRL TonyRL commented Jan 1, 2025

Involved Issue / 该 PR 相关 Issue

Close #

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

/youtube/user/WholeMars
/youtube/user/@WholeMars

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

@github-actions github-actions bot added the Route label Jan 1, 2025
Copy link
Contributor

github-actions bot commented Jan 1, 2025

Successfully generated as following:

http://localhost:1200/youtube/user/WholeMars - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: YouTube RSS is disabled due to the lack of &lt;a href=&quot;https://docs.rsshub.app/deploy/config#route-specific-configurations&quot;&gt;relevant config&lt;/a&gt;
Route: /youtube/user/:username/:embed?
Full Route: /youtube/user/WholeMars
Node Version: v22.12.0
Git Hash: d1320eb8
http://localhost:1200/youtube/user/@WholeMars - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: YouTube RSS is disabled due to the lack of &lt;a href=&quot;https://docs.rsshub.app/deploy/config#route-specific-configurations&quot;&gt;relevant config&lt;/a&gt;
Route: /youtube/user/:username/:embed?
Full Route: /youtube/user/@WholeMars
Node Version: v22.12.0
Git Hash: d1320eb8

@github-actions github-actions bot added the Auto: Route Test Complete Auto route test has finished on given PR label Jan 1, 2025
@TonyRL TonyRL requested a review from Copilot January 1, 2025 16:57

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

lib/routes/youtube/user.ts:81

  • [nitpick] The error message could be more informative. Consider changing it to: The channel https://www.youtube.com/user/${username} does not exist. Please check the handle and try again.
throw new NotFoundError(`The channel https://www.youtube.com/user/${username} does not exist.`);

lib/routes/youtube/user.ts:81

  • Ensure that the new error handling behavior is covered by tests. Add a test case for when the channel does not exist.
throw new NotFoundError(`The channel https://www.youtube.com/user/${username} does not exist.`);
Copy link
Contributor

github-actions bot commented Jan 1, 2025

Successfully generated as following:

http://localhost:1200/youtube/user/WholeMars - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: YouTube RSS is disabled due to the lack of &lt;a href=&quot;https://docs.rsshub.app/deploy/config#route-specific-configurations&quot;&gt;relevant config&lt;/a&gt;
Route: /youtube/user/:username/:embed?
Full Route: /youtube/user/WholeMars
Node Version: v22.12.0
Git Hash: 4e4e2837
http://localhost:1200/youtube/user/@WholeMars - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: YouTube RSS is disabled due to the lack of &lt;a href=&quot;https://docs.rsshub.app/deploy/config#route-specific-configurations&quot;&gt;relevant config&lt;/a&gt;
Route: /youtube/user/:username/:embed?
Full Route: /youtube/user/@WholeMars
Node Version: v22.12.0
Git Hash: 4e4e2837

@TonyRL TonyRL merged commit efcac36 into DIYgod:master Jan 1, 2025
31 checks passed
@TonyRL TonyRL deleted the fix/youtube-check branch January 1, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto: Route Test Complete Auto route test has finished on given PR Route
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant