-
Notifications
You must be signed in to change notification settings - Fork 721
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
Feed detection from a Youtube Playlist should also cover playlists URLs that contain a video ID #2628
Closed
1 task done
Labels
Comments
ztec
added a commit
to ztec/miniflux
that referenced
this issue
Jun 13, 2024
In order to be more resilient to YouTube URLs variation and to address this feature_request: miniflux#2628 I've reworked a bit the way the YouTube feed extraction is done. I've kept all the `FindSubscriptionsFromYouTube*` in order to keep all the existing unit tests as-is ensuring little to no regressions. By doing so, I had to call twice `youtubeURLIDExtractor`. Small performance penalty for peace of mind in my opinion. `youtubeURLIDExtractor` is made in a way only one kind of page can be detected at a time. This mean I can solve the "video in a playlist" feature_request by prioritizing the playlist ID over the Video ID Also, by using `url.Parse()` to get ids, it's safer to url mangle and variation. The most common variation being the `t=42` parameters that start the playback at a given position. Previously, this kind of url would not be detected as "YouTube URL". I deliberately ignored the url parsing error to keep previous behavior (skip the YouTube analysis and follow with the other analysis) I also tried to keep debug logs the same as before as much as I could. I manually tested all the YouTube cases (video,channel,playlist) and they all work as expected except for the video. But this one does not work either on main. The `meta` html tag that was searched for does not seems to exist anymore.
ztec
added a commit
to ztec/miniflux
that referenced
this issue
Jun 13, 2024
In order to be more resilient to YouTube URLs variation and to address this feature_request: miniflux#2628 I've reworked a bit the way the YouTube feed extraction is done. I've kept all the `FindSubscriptionsFromYouTube*` in order to keep all the existing unit tests as-is ensuring little to no regressions. By doing so, I had to call twice `youtubeURLIDExtractor`. Small performance penalty for peace of mind in my opinion. `youtubeURLIDExtractor` is made in a way only one kind of page can be detected at a time. This mean I can solve the "video in a playlist" feature_request by prioritizing the playlist ID over the Video ID Also, by using `url.Parse()` to get ids, it's safer to url mangle and variation. The most common variation being the `t=42` parameters that start the playback at a given position. Previously, this kind of url would not be detected as "YouTube URL". I deliberately ignored the url parsing error to keep previous behavior (skip the YouTube analysis and follow with the other analysis) I also tried to keep debug logs the same as before as much as I could. I manually tested all the YouTube cases (video,channel,playlist) and they all work as expected except for the video. But this one does not work either on main. The `meta` html tag that was searched for does not seem to exist anymore. fix: miniflux#2628
ztec
added a commit
to ztec/miniflux
that referenced
this issue
Jun 13, 2024
In order to be more resilient to YouTube URLs variation and to address this feature_request: miniflux#2628 I've reworked a bit the way the YouTube feed extraction is done. I've kept all the `FindSubscriptionsFromYouTube*` in order to keep all the existing unit tests as-is ensuring little to no regressions. By doing so, I had to call twice `youtubeURLIDExtractor`. Small performance penalty for peace of mind in my opinion. `youtubeURLIDExtractor` is made in a way only one kind of page can be detected at a time. This mean I can solve the "video in a playlist" feature_request by prioritizing the playlist ID over the Video ID Also, by using `url.Parse()` to get ids, it's safer to url mangle and variation. The most common variation being the `t=42` parameters that start the playback at a given position. Previously, this kind of url would not be detected as "YouTube URL". I deliberately ignored the url parsing error to keep previous behavior (skip the YouTube analysis and follow with the other analysis) I also tried to keep debug logs the same as before as much as I could. I manually tested all the YouTube cases (video,channel,playlist) and they all work as expected except for the video. But this one does not work either on main. The `meta` html tag that was searched for does not seem to exist anymore. fix: miniflux#2628
ztec
added a commit
to ztec/miniflux
that referenced
this issue
Jun 13, 2024
In order to be more resilient to YouTube URLs variation and to address this feature_request: miniflux#2628 I've reworked a bit the way the YouTube feed extraction is done. I've kept all the `FindSubscriptionsFromYouTube*` in order to keep all the existing unit tests as-is ensuring little to no regressions. By doing so, I had to call twice `youtubeURLIDExtractor`. Small performance penalty for peace of mind in my opinion. `youtubeURLIDExtractor` is made in a way only one kind of page can be detected at a time. This mean I can solve the "video in a playlist" feature_request by prioritizing the playlist ID over the Video ID Also, by using `url.Parse()` to get ids, it's safer to url mangle and variation. The most common variation being the `t=42` parameters that start the playback at a given position. Previously, this kind of url would not be detected as "YouTube URL". I deliberately ignored the url parsing error to keep previous behavior (skip the YouTube analysis and follow with the other analysis) I also tried to keep debug logs the same as before as much as I could. I manually tested all the YouTube cases (video,channel,playlist) and they all work as expected except for the video. But this one does not work either on main. The `meta` html tag that was searched for does not seem to exist anymore. fix: miniflux#2628
ztec
added a commit
to ztec/miniflux
that referenced
this issue
Jun 13, 2024
In order to be more resilient to YouTube URLs variation and to address this feature_request: miniflux#2628 I've reworked a bit the way the YouTube feed extraction is done. I've kept all the `FindSubscriptionsFromYouTube*` in order to keep all the existing unit tests as-is ensuring little to no regressions. By doing so, I had to call twice `youtubeURLIDExtractor`. Small performance penalty for peace of mind in my opinion. `youtubeURLIDExtractor` is made in a way only one kind of page can be detected at a time. This mean I can solve the "video in a playlist" feature_request by prioritizing the playlist ID over the Video ID Also, by using `url.Parse()` to get ids, it's safer to url mangle and variation. The most common variation being the `t=42` parameters that start the playback at a given position. Previously, this kind of url would not be detected as "YouTube URL". I deliberately ignored the url parsing error to keep previous behavior (skip the YouTube analysis and follow with the other analysis) I also tried to keep debug logs the same as before as much as I could. I manually tested all the YouTube cases (video,channel,playlist) and they all work as expected except for the video. But this one does not work either on main. The `meta` html tag that was searched for does not seem to exist anymore. fix: miniflux#2628
ztec
added a commit
to ztec/miniflux
that referenced
this issue
Jun 13, 2024
In order to be more resilient to YouTube URLs variation and to address this feature_request: miniflux#2628 I've reworked a bit the way the YouTube feed extraction is done. I've kept all the `FindSubscriptionsFromYouTube*` in order to keep all the existing unit tests as-is ensuring little to no regressions. By doing so, I had to call twice `youtubeURLIDExtractor`. Small performance penalty for peace of mind in my opinion. `youtubeURLIDExtractor` is made in a way only one kind of page can be detected at a time. This mean I can solve the "video in a playlist" feature_request by prioritizing the playlist ID over the Video ID Also, by using `url.Parse()` to get ids, it's safer to url mangle and variation. The most common variation being the `t=42` parameters that start the playback at a given position. Previously, this kind of url would not be detected as "YouTube URL". I deliberately ignored the url parsing error to keep previous behavior (skip the YouTube analysis and follow with the other analysis) I also tried to keep debug logs the same as before as much as I could. I manually tested all the YouTube cases (video,channel,playlist) and they all work as expected except for the video. But this one does not work either on main. The `meta` html tag that was searched for does not seem to exist anymore. fix: miniflux#2628
ztec
added a commit
to ztec/miniflux
that referenced
this issue
Jun 13, 2024
In order to be more resilient to YouTube URLs variation and to address this feature_request: miniflux#2628 I've reworked a bit the way the YouTube feed extraction is done. I've kept all the `FindSubscriptionsFromYouTube*` in order to keep all the existing unit tests as-is ensuring little to no regressions. By doing so, I had to call twice `youtubeURLIDExtractor`. Small performance penalty for peace of mind in my opinion. `youtubeURLIDExtractor` is made in a way only one kind of page can be detected at a time. This mean I can solve the "video in a playlist" feature_request by prioritizing the playlist ID over the Video ID Also, by using `url.Parse()` to get ids, it's safer to url mangle and variation. The most common variation being the `t=42` parameters that start the playback at a given position. Previously, this kind of url would not be detected as "YouTube URL". I deliberately ignored the url parsing error to keep previous behavior (skip the YouTube analysis and follow with the other analysis) I also tried to keep debug logs the same as before as much as I could. I manually tested all the YouTube cases (video,channel,playlist) and they all work as expected except for the video. But this one does not work either on main. The `meta` html tag that was searched for does not seem to exist anymore. fix: miniflux#2628
ztec
added a commit
to ztec/miniflux
that referenced
this issue
Jun 13, 2024
In order to be more resilient to YouTube URLs variation and to address this feature_request: miniflux#2628 I've reworked a bit the way the YouTube feed extraction is done. I've kept all the `FindSubscriptionsFromYouTube*` in order to keep all the existing unit tests as-is ensuring little to no regressions. By doing so, I had to call twice `youtubeURLIDExtractor`. Small performance penalty for peace of mind in my opinion. `youtubeURLIDExtractor` is made in a way only one kind of page can be detected at a time. This mean I can solve the "video in a playlist" feature_request by prioritizing the playlist ID over the Video ID Also, by using `url.Parse()` to get ids, it's safer to url mangle and variation. The most common variation being the `t=42` parameters that start the playback at a given position. Previously, this kind of url would not be detected as "YouTube URL". I deliberately ignored the url parsing error to keep previous behavior (skip the YouTube analysis and follow with the other analysis) I also tried to keep debug logs the same as before as much as I could. I manually tested all the YouTube cases (video,channel,playlist) and they all work as expected except for the video. But this one does not work either on main. The `meta` html tag that was searched for does not seem to exist anymore. fix: miniflux#2628
Awesome ! Many thanks @ztec 🤟🏻 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The recent work done for detecting feeds from Youtube playlists is great and I enjoy it. However I had an error the first time I tested it because I had different expectations which motivates me to write this feature request.
Sometimes while opening a playlist, we start immediately with a playing video and thus the URL will be focused on the video while containing also the Playlist ID at the end, e.g :
https://www.youtube.com/watch?v=xF81tWZX84c&list=PLWrIqGszZr5kGyHwMPQBfKnRd850ynGBh
And then there is the pattern supported by Miniflux, which is the canonical playlist URL, like
https://www.youtube.com/playlist?list=PLWrIqGszZr5kGyHwMPQBfKnRd850ynGBh
Notice that the Playlist ID is present in both examples, but only the second example is supported by Miniflux currently.
To reproduce the UX : when Youtube shows playlists as part of research results, clicking on one DOM element instead of another will either redirect to the playlist home page (color purple in image below) or will open the URL to a specific video and append the playlist ID to the query parameters (the URL in red in the picture below).
The text was updated successfully, but these errors were encountered: