Skip to content

Commit ae23059

Browse files
committed
added support for channels on invidio.us
1 parent 79ba6ab commit ae23059

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public String getId(String url) throws ParsingException {
4646
URL urlObj = Utils.stringToURL(url);
4747
String path = urlObj.getPath();
4848

49-
if (!(YoutubeParsingHelper.isYoutubeURL(urlObj) || urlObj.getHost().equalsIgnoreCase("hooktube.com"))) {
49+
if (!YoutubeParsingHelper.isYoutubeALikeURL(urlObj)) { // fixme: accepts youtu.be and youtube-nocookie.com
5050
throw new ParsingException("the URL given is not a Youtube-URL");
5151
}
5252

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public static boolean isYoutubeALikeURL(URL url) {
6363
String host = url.getHost();
6464
return host.equalsIgnoreCase("youtube.com") || host.equalsIgnoreCase("www.youtube.com")
6565
|| host.equalsIgnoreCase("m.youtube.com") || host.equalsIgnoreCase("www.youtube-nocookie.com")
66-
|| host.equalsIgnoreCase("youtu.be") || host.equalsIgnoreCase("hooktube.com");
66+
|| host.equalsIgnoreCase("youtu.be") || host.equalsIgnoreCase("hooktube.com")
67+
|| host.equalsIgnoreCase("invidio.us");
6768
}
6869

6970
public static long parseDurationString(String input)

0 commit comments

Comments
 (0)