fixed YoutubePlaylistLinkHandlerFactory accepting invalid links
This commit is contained in:
parent
1ab7a1f930
commit
6390eb268b
|
@ -30,6 +30,11 @@ public class YoutubePlaylistLinkHandlerFactory extends ListLinkHandlerFactory {
|
||||||
throw new ParsingException("the url given is not a Youtube-URL");
|
throw new ParsingException("the url given is not a Youtube-URL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String path = urlObj.getPath();
|
||||||
|
if (!path.equals("/watch" ) && !path.equals("/playlist")) {
|
||||||
|
throw new ParsingException("the url given is neither a video nor a playlist URL");
|
||||||
|
}
|
||||||
|
|
||||||
String listID = Utils.getQueryValue(urlObj, "list");
|
String listID = Utils.getQueryValue(urlObj, "list");
|
||||||
|
|
||||||
if (listID == null) {
|
if (listID == null) {
|
||||||
|
|
Loading…
Reference in New Issue