[YouTube] Support Shorts UI in playlists #1093
Merged
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.
I only used my test class on which no errors occurred during my tests.
This PR fixes the extraction of items in YouTube playlists returning a Shorts UI.
A new test in
YoutubePlaylistExtractorTest
has been added to test the extraction of items with this playlist UI, which uses the system playlist of uploaded shorts by the official YouTube channel (UUSHBR8-60-B28hp2BmDPdntcQ
).As one of the effects of YouTube using a shorts UI, no uploader info is available for each stream. The default tests expected that the uploader name was set, so I had to remove this check (I also removed the uploader URL one, as it was commented out).
Finally this PR removes an outdated A/B test comment in
YoutubePlaylistExtractor
and fixes a bug in theassertNotEmpty
test method of the extractor's assertions class (ExtractorAsserts
) which tested that the test failure message, annotated as nullable, was not null instead of the string to check (it was the initial cause of the stream items' tests failures of my test class added with this PR, as no uploader name was provided and aNullPointerException
was thrown).Fixes #1077.