mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-27 15:30:34 +05:30
added support and tests for Invidio Trending-URLs
This commit is contained in:
parent
7493ed903b
commit
cce5e4ad33
@ -48,6 +48,6 @@ public class YoutubeTrendingLinkHandlerFactory extends ListLinkHandlerFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String urlPath = urlObj.getPath();
|
String urlPath = urlObj.getPath();
|
||||||
return Utils.isHTTP(urlObj) && (YoutubeParsingHelper.isYoutubeURL(urlObj)) && urlPath.equals("/feed/trending");
|
return Utils.isHTTP(urlObj) && (YoutubeParsingHelper.isYoutubeURL(urlObj) || YoutubeParsingHelper.isInvidioURL(urlObj)) && urlPath.equals("/feed/trending");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,10 @@ public class YoutubeTrendingLinkHandlerFactoryTest {
|
|||||||
assertTrue(LinkHandlerFactory.acceptUrl("https://youtube.com/feed/trending"));
|
assertTrue(LinkHandlerFactory.acceptUrl("https://youtube.com/feed/trending"));
|
||||||
assertTrue(LinkHandlerFactory.acceptUrl("m.youtube.com/feed/trending"));
|
assertTrue(LinkHandlerFactory.acceptUrl("m.youtube.com/feed/trending"));
|
||||||
|
|
||||||
|
assertTrue(LinkHandlerFactory.acceptUrl("https://www.invidio.us/feed/trending"));
|
||||||
|
assertTrue(LinkHandlerFactory.acceptUrl("https://invidio.us/feed/trending"));
|
||||||
|
assertTrue(LinkHandlerFactory.acceptUrl("invidio.us/feed/trending"));
|
||||||
|
|
||||||
assertFalse(LinkHandlerFactory.acceptUrl("https://youtu.be/feed/trending"));
|
assertFalse(LinkHandlerFactory.acceptUrl("https://youtu.be/feed/trending"));
|
||||||
assertFalse(LinkHandlerFactory.acceptUrl("kdskjfiiejfia"));
|
assertFalse(LinkHandlerFactory.acceptUrl("kdskjfiiejfia"));
|
||||||
assertFalse(LinkHandlerFactory.acceptUrl("https://www.youtube.com/bullshit/feed/trending"));
|
assertFalse(LinkHandlerFactory.acceptUrl("https://www.youtube.com/bullshit/feed/trending"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user