miniflux/internal
Ztec e54825bf02 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
2024-06-13 20:18:47 -07:00
..
api api tests: use intSize-agnostic random integers 2024-04-01 21:02:48 -07:00
cli cli: avoid misleading error message when creating an admin user 2024-03-23 14:32:55 -07:00
config options: add FETCH_NEBULA_WATCH_TIME 2024-05-02 16:30:01 -07:00
crypto Make use of HashFromBytes everywhere 2024-03-11 15:22:22 -07:00
database Add description field to feed settings 2024-05-06 15:40:36 -07:00
fever Rename PROXY_* options to MEDIA_PROXY_* 2024-03-20 21:28:28 -07:00
googlereader googelreader: set CrawlTimeMsec at the correct precision 2024-05-29 21:54:02 -07:00
http Make cookie duration dependent on configuration 2024-05-01 19:34:13 -07:00
integration integration/raindrop: initial draft implementation 2024-05-02 16:23:00 -07:00
locale Add description field to feed settings 2024-05-06 15:40:36 -07:00
mediaproxy Rename PROXY_* options to MEDIA_PROXY_* 2024-03-20 21:28:28 -07:00
metric Implement structured logging using log/slog package 2023-09-24 22:37:33 -07:00
model Add description field to feed settings 2024-05-06 15:40:36 -07:00
oauth2 Implement structured logging using log/slog package 2023-09-24 22:37:33 -07:00
reader Improve YouTube page feed detection 2024-06-13 20:18:47 -07:00
storage Add description field to feed settings 2024-05-06 15:40:36 -07:00
systemd Move internal packages to an internal folder 2023-08-10 20:29:34 -07:00
template Fix Playback speed indicator on shared entries 2024-06-13 20:11:33 -07:00
timezone timezone: make sure the tests pass when the timezone database is not installed on the host 2024-03-24 13:25:02 -07:00
ui Fix Playback speed indicator precision 2024-06-13 20:13:07 -07:00
urllib Use strings.EqualFold instead of strings.ToLower(…) == 2024-02-28 19:47:30 -08:00
validator feat: Media player: Conrol playback speed 2024-03-17 11:53:30 -07:00
version Move internal packages to an internal folder 2023-08-10 20:29:34 -07:00
worker Use modern for loops 2024-02-28 19:55:28 -08:00