mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-13 22:00:32 +05:30
[YouTube] Support playlists as URL navigation endpoints
This commit is contained in:
parent
c99d94b615
commit
9fa8d4c0b4
@ -825,9 +825,15 @@ public final class YoutubeParsingHelper {
|
|||||||
final String canonicalBaseUrl = browseEndpoint.getString("canonicalBaseUrl");
|
final String canonicalBaseUrl = browseEndpoint.getString("canonicalBaseUrl");
|
||||||
final String browseId = browseEndpoint.getString("browseId");
|
final String browseId = browseEndpoint.getString("browseId");
|
||||||
|
|
||||||
// All channel ids are prefixed with UC
|
if (browseId != null) {
|
||||||
if (browseId != null && browseId.startsWith("UC")) {
|
if (browseId.startsWith("UC")) {
|
||||||
|
// All channel IDs are prefixed with UC
|
||||||
return "https://www.youtube.com/channel/" + browseId;
|
return "https://www.youtube.com/channel/" + browseId;
|
||||||
|
} else if (browseId.startsWith("VL")) {
|
||||||
|
// All playlist IDs are prefixed with VL, which needs to be removed from the
|
||||||
|
// playlist ID
|
||||||
|
return "https://www.youtube.com/playlist?list=" + browseId.substring(2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isNullOrEmpty(canonicalBaseUrl)) {
|
if (!isNullOrEmpty(canonicalBaseUrl)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user