mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-14 14:20:33 +05:30
added support for videos on invidio.us
This commit is contained in:
parent
399b4f2eef
commit
2ae23a6f79
@ -147,6 +147,20 @@ public class YoutubeStreamLinkHandlerFactory extends LinkHandlerFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "HOOKTUBE.COM": {
|
case "HOOKTUBE.COM": {
|
||||||
|
if (path.startsWith("v/")) {
|
||||||
|
String id = path.substring("v/".length());
|
||||||
|
|
||||||
|
return assertIsID(id);
|
||||||
|
}
|
||||||
|
if (path.startsWith("watch/")) {
|
||||||
|
String id = path.substring("watch/".length());
|
||||||
|
|
||||||
|
return assertIsID(id);
|
||||||
|
}
|
||||||
|
// there is no break-statement here on purpose so the next code-block gets also run for hooktube
|
||||||
|
}
|
||||||
|
|
||||||
|
case "INVIDIO.US": { // code-block for hooktube.com and invidio.us
|
||||||
if (path.equals("watch")) {
|
if (path.equals("watch")) {
|
||||||
String viewQueryValue = Utils.getQueryValue(url, "v");
|
String viewQueryValue = Utils.getQueryValue(url, "v");
|
||||||
if (viewQueryValue != null) {
|
if (viewQueryValue != null) {
|
||||||
@ -158,20 +172,10 @@ public class YoutubeStreamLinkHandlerFactory extends LinkHandlerFactory {
|
|||||||
|
|
||||||
return assertIsID(id);
|
return assertIsID(id);
|
||||||
}
|
}
|
||||||
if (path.startsWith("v/")) {
|
|
||||||
String id = path.substring("v/".length());
|
|
||||||
|
|
||||||
return assertIsID(id);
|
|
||||||
}
|
|
||||||
if (path.startsWith("watch/")) {
|
|
||||||
String id = path.substring("watch/".length());
|
|
||||||
|
|
||||||
return assertIsID(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
throw new ParsingException("Error no suitable url: " + urlString);
|
throw new ParsingException("Error no suitable url: " + urlString);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user