plugins.youtube: rewrite and fix matchers#5137
Conversation
|
Apparently,
|
6293401 to
1cfc047
Compare
1cfc047 to
a3fe96f
Compare
|
Do you want people to test this prior to merge? |
|
If you take a look at the diff of the force-pushes, you can see that I already removed the |
|
I was talking about this portion:
since you asked the reporter to take a look in #5136 (comment) |
|
Changes should be fine, I guess. If there are no reviews, then so be it, and if there are any issues after merging, then those will need to get fixed afterwards. |
|
Let's give the original reporter one more day to test then consider this good. I tried a few URLs last night for the various matchers and they were fine. |
These are still working: https://www.youtube.com/user/Bloomberg This list could be continued. Some /user/ and @ endpoints with the same id point to the same channel while others to different. Some where I saw redirection. What endpoints works depends on channel. So the migration could take a long time if not endless |
|
The @-URLs are not mapped to /user/-URLs, because @-URLs had a first-come-first-serve registration phase. I was under the impression that /user/-URLs had been completely removed, because the channels I had tested were not working anymore, but apparently that's not the case for all channels. This is typical YouTube inconsistency. A revert of the removal is trivial though because it only affects the matcher regex and nothing else. I'll open a PR in a bit. |
How did you decide the correct /user/-URL for the channels you tested? The NASA one for example is not /user/nasa but /user/NASAtelevision. Can you share the URLs of the other channels that seemingly didn't work? |
Fixes #5136
This splits up the ugly verbose matcher regex into separate matchers for each URL type, and it adds the new
@-URLs and/live/video-idURLs.Before merging, please help me validate all the supported URLs, because splitting up the matchers required some refactoring, and not all
self.match[key]keys are available anymore, which can lead to an unintendedIndexErrorbeing raised.Btw, this unrelated issue with the muxed adaptive streams and missing audio bitrates needs separate fixing: