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

[YouTube] Fix channel ID extraction of YouTube channels RSS feeds #1015

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

AudricV
Copy link
Member

@AudricV AudricV commented Jan 17, 2023

In RSS channels feeds, the yt:channelId element doesn't provide the channel ID anymore (it has no value), like the id element (only the yt:channel: prefix is provided). This currently makes getId() method of YoutubeFeedExtractor returning null, and so fails the method testId of YoutubeFeedExtractorTest.Kurzgesagt test class.

We need now to extract it from the channel URL provided in two elements: author -> uri and feed -> link.

This PR also avoids NullPointerExceptions which could happen in getUrl and getName methods of YoutubeFeedExtractor.

@AudricV AudricV added bug Issue is related to a bug youtube service, https://www.youtube.com/ labels Jan 17, 2023
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Lgtm other than the two small details. Thank you!

The yt:channelId element doesn't provide the channel ID anymore and is empty,
like the id element, so we need now to extract it from the channel URL provided
in two elements: author -> uri and feed -> link.

Also avoid a NullPointerException in getUrl and getName methods.
@AudricV AudricV force-pushed the yt_fix-channel-id-rss-feeds branch from 7f2b4c8 to 1f4ed9d Compare January 28, 2023 10:53
@AudricV AudricV requested a review from Stypox January 28, 2023 10:53
@Stypox Stypox merged commit 3519d4c into TeamNewPipe:dev Jan 29, 2023
@AudricV AudricV deleted the yt_fix-channel-id-rss-feeds branch January 29, 2023 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug youtube service, https://www.youtube.com/
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants