You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[YouTube] Workaround Shorts UI for playlists by using a continuation for initial items
YouTube don't return currently a continuation, if applicable, for the Shorts UI
in playlists, restricting access to the 100th first items. The reel items
returned don't give also upload date, uploader info and precise view count.
Using a continuation which requests the first page of the playlist allows
currently to get access to continuations, if applicable, and also standard
video elements instead of Shorts ones, making extraction of upload date,
uploader info and precise view count again possible.
This continuation is only requested and used when the data structure should be
the one of the Shorts UI.
A fallback to the standard response is made in the cases where fetching or
parsing the continuation response fails, or when no stream items are extracted.
This change required to:
- add a protocol buffer definition file for which its structure is based on
reverse engineering of playlists continuations sent by WEB InnerTube client,
received from InnerTube responses;
- add a dependency on Protobuf Java Lite;
- generate Java classes from the definition file with the protoc version
corresponding to the one of the Protobuf Java Lite dependency used (see
https://protobuf.dev/support/version-support/ for more details); they are
excluded from Checkstyle checks as they do not follow our style rules at all;
- add a dependency on Apache Commons Codec, as Java's Base64 class desugaring
for Android is not released yet.
Copy file name to clipboardExpand all lines: extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubePlaylistExtractor.java
0 commit comments