diff options
author | 2024-06-13 16:30:15 +0200 | |
---|---|---|
committer | 2024-06-13 20:18:47 -0700 | |
commit | e54825bf02427a19615d094711dd53985e92ccde (patch) | |
tree | 7ed35e311fc50dae8f7c788709c8eb9448eb41a9 /internal/database/migrations.go | |
parent | 07f6d397d434f88676da1091a8837933c55bbb29 (diff) | |
download | v2-e54825bf02427a19615d094711dd53985e92ccde.tar.gz v2-e54825bf02427a19615d094711dd53985e92ccde.tar.zst v2-e54825bf02427a19615d094711dd53985e92ccde.zip |
Improve YouTube page feed detection
In order to be more resilient to YouTube URLs variation and
to address this feature_request: https://github.com/miniflux/v2/issues/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: #2628
Diffstat (limited to 'internal/database/migrations.go')
0 files changed, 0 insertions, 0 deletions