added support for channels on invidio.us
This commit is contained in:
parent
79ba6aba95
commit
ae23059d66
|
@ -46,7 +46,7 @@ public class YoutubeChannelLinkHandlerFactory extends ListLinkHandlerFactory {
|
||||||
URL urlObj = Utils.stringToURL(url);
|
URL urlObj = Utils.stringToURL(url);
|
||||||
String path = urlObj.getPath();
|
String path = urlObj.getPath();
|
||||||
|
|
||||||
if (!(YoutubeParsingHelper.isYoutubeURL(urlObj) || urlObj.getHost().equalsIgnoreCase("hooktube.com"))) {
|
if (!YoutubeParsingHelper.isYoutubeALikeURL(urlObj)) { // fixme: accepts youtu.be and youtube-nocookie.com
|
||||||
throw new ParsingException("the URL given is not a Youtube-URL");
|
throw new ParsingException("the URL given is not a Youtube-URL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,8 @@ public class YoutubeParsingHelper {
|
||||||
String host = url.getHost();
|
String host = url.getHost();
|
||||||
return host.equalsIgnoreCase("youtube.com") || host.equalsIgnoreCase("www.youtube.com")
|
return host.equalsIgnoreCase("youtube.com") || host.equalsIgnoreCase("www.youtube.com")
|
||||||
|| host.equalsIgnoreCase("m.youtube.com") || host.equalsIgnoreCase("www.youtube-nocookie.com")
|
|| host.equalsIgnoreCase("m.youtube.com") || host.equalsIgnoreCase("www.youtube-nocookie.com")
|
||||||
|| host.equalsIgnoreCase("youtu.be") || host.equalsIgnoreCase("hooktube.com");
|
|| host.equalsIgnoreCase("youtu.be") || host.equalsIgnoreCase("hooktube.com")
|
||||||
|
|| host.equalsIgnoreCase("invidio.us");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long parseDurationString(String input)
|
public static long parseDurationString(String input)
|
||||||
|
|
Loading…
Reference in New Issue