feat(finder): enhance youtube channel parsing with default playlists #3892
+131
−21
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.
This PR enhances the existing custom YouTube parsing. It consists of two parts:
https://www.youtube.com/@rossmanngroupandhttps://www.youtube.com/c/Jan%C5%9Apiewak1are both proper YouTube channel URLs, and Miniflux tries to parse them withfindSubscriptionsFromYouTube, but fails - because it expects the URL's path to contain either/channel,/watchor/playlist.Conveniently, YouTube uses
<link rel="canonical" href="...">, and this canonical URL is exactly what the parser wants.findCanonicalURLextracts this exact URL. That way we prevent YouTube links to fall through to generic feed parser infindSubscriptionsFromWebPage.YouTube has this undocumented feature, where it generates multiple convenience playlist for each channel, using some clever prefixes (details in this SO post).
Now that we catch all YouTube channels correctly, we can automatically display default playlists, making it easier to subscribe only to shorts, live streams, or popular videos.
I'm using this myself a lot, it would be very convenient not to have to remember all these prefixes, and enter them manually. And I assume it's not even obvious for most people such possibility exists.
Screenshot:
Have you followed these guidelines?