Skip to content

Commit ece968d

Browse files
G-flatTobiGr
authored andcommitted
Support more YouTube channels
1 parent 48d27be commit ece968d

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeChannelLinkHandlerFactory.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,10 @@ public String getId(final String url) throws ParsingException, UnsupportedOperat
101101

102102
String[] splitPath = path.split("/");
103103

104-
if (isHandle(splitPath)) {
105-
// Handle YouTube handle URLs like youtube.com/@yourhandle
104+
if (isHandle(splitPath) || isCustomShortChannelUrl(splitPath)) {
105+
// Handle YouTube handle URLs like youtube.com/@yourhandle and
106+
// custom short channel URLs like youtube.com/yourcustomname
106107
return splitPath[0];
107-
} else if (isCustomShortChannelUrl(splitPath)) {
108-
// Handle custom short channel URLs like youtube.com/yourcustomname
109-
path = "c/" + path;
110-
splitPath = path.split("/");
111108
}
112109

113110
if (!path.startsWith("user/") && !path.startsWith("channel/")

0 commit comments

Comments
 (0)