From 5a2dcdce166e1acb8dc3de2b4b9ad95674a9c779 Mon Sep 17 00:00:00 2001 From: Andrew <30773181+2secslater@users.noreply.github.com> Date: Thu, 8 Aug 2019 00:19:02 +0000 Subject: [PATCH 1/3] Add Invidious instances Added all publicly listed Invidious instances from omarroth/invidious wiki page to the link handler factory for YouTube. --- .../YoutubeStreamLinkHandlerFactory.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java index 521fa47c..478ebe2d 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java @@ -163,7 +163,20 @@ public class YoutubeStreamLinkHandlerFactory extends LinkHandlerFactory { } case "WWW.INVIDIO.US": - case "INVIDIO.US": { // code-block for hooktube.com and invidio.us + case "DEV.INVIDIO.US" + case "INVIDIO.US": + case "INVIDIOUS.SNOPYTA.ORG": + case "DE.INVIDIOUS.SNOPYTA.ORG": + case "FI.INVIDIOUS.SNOPYTA.ORG": + case "VID.WXZM.SX": + case "INVIDIOUS.KABI.TK": + case "INVIDIOU.SH": + case "WWW.INVIDIOU.SH": + case "NO.INVIDIOU.SH": + case "INVIDIOUS.ENKIRTON.NET": + case "TUBE.POAL.CO": + case "INVIDIOUS.13AD.DE": + case "YT.ELUKERIO.ORG": { // code-block for hooktube.com and Invidious instances if (path.equals("watch")) { String viewQueryValue = Utils.getQueryValue(url, "v"); if (viewQueryValue != null) { From 7fb17684f5d979cef0aeb7cece303c1ab7ad1f09 Mon Sep 17 00:00:00 2001 From: Andrew <30773181+2secslater@users.noreply.github.com> Date: Thu, 8 Aug 2019 00:25:42 +0000 Subject: [PATCH 2/3] Fixed missing colon causing builds to fail --- .../youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java index 478ebe2d..853f77fe 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java @@ -163,7 +163,7 @@ public class YoutubeStreamLinkHandlerFactory extends LinkHandlerFactory { } case "WWW.INVIDIO.US": - case "DEV.INVIDIO.US" + case "DEV.INVIDIO.US": case "INVIDIO.US": case "INVIDIOUS.SNOPYTA.ORG": case "DE.INVIDIOUS.SNOPYTA.ORG": From d0f1c31b34f8e7a9f1367e2c8a11ad50638586f8 Mon Sep 17 00:00:00 2001 From: Andrew <30773181+2secslater@users.noreply.github.com> Date: Tue, 10 Sep 2019 17:54:32 +0100 Subject: [PATCH 3/3] Add Invidious instances to parsing helper for YouTube --- .../services/youtube/linkHandler/YoutubeParsingHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeParsingHelper.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeParsingHelper.java index 7464b7b4..8174dc49 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeParsingHelper.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeParsingHelper.java @@ -48,7 +48,7 @@ public class YoutubeParsingHelper { public static boolean isInvidioURL(URL url) { String host = url.getHost(); - return host.equalsIgnoreCase("invidio.us") || host.equalsIgnoreCase("www.invidio.us"); + return host.equalsIgnoreCase("invidio.us") || host.equalsIgnoreCase("dev.invidio.us") || host.equalsIgnoreCase("www.invidio.us") || host.equalsIgnoreCase("invidious.snopyta.org") || host.equalsIgnoreCase("de.invidious.snopyta.org") || host.equalsIgnoreCase("fi.invidious.snopyta.org") || host.equalsIgnoreCase("vid.wxzm.sx") || host.equalsIgnoreCase("invidious.kabi.tk") || host.equalsIgnoreCase("invidiou.sh") || host.equalsIgnoreCase("www.invidiou.sh") || host.equalsIgnoreCase("no.invidiou.sh") || host.equalsIgnoreCase("invidious.enkirton.net") || host.equalsIgnoreCase("tube.poal.co") || host.equalsIgnoreCase("invidious.13ad.de") || host.equalsIgnoreCase("yt.elukerio.org"); } public static long parseDurationString(String input)