mirror of
https://github.com/TeamNewPipe/NewPipeExtractor
synced 2025-08-30 22:05:18 +00:00
added Invidio subdomain test and fixed error in test caused by Invidio playlist support
This commit is contained in:
@@ -127,18 +127,20 @@ public class YoutubeStreamLinkHandlerFactoryTest {
|
||||
@Test
|
||||
public void testAcceptInvidioUrl() throws ParsingException {
|
||||
assertTrue(linkHandler.acceptUrl("https://invidio.us/watch?v=TglNG-yjabU"));
|
||||
assertTrue(linkHandler.acceptUrl("http://www.invidio.us/watch?v=TglNG-yjabU"));
|
||||
assertTrue(linkHandler.acceptUrl("http://invidio.us/watch?v=TglNG-yjabU"));
|
||||
assertTrue(linkHandler.acceptUrl("invidio.us/watch?v=3msbfr6pBNE"));
|
||||
assertTrue(linkHandler.acceptUrl("https://invidio.us/watch?v=ocH3oSnZG3c&list=PLS2VU1j4vzuZwooPjV26XM9UEBY2CPNn2"));
|
||||
assertTrue(linkHandler.acceptUrl("https://invidio.us/watch?v=ocH3oSnZG3c&test=PLS2VU1j4vzuZwooPjV26XM9UEBY2CPNn2"));
|
||||
assertTrue(linkHandler.acceptUrl("invidio.us/embed/3msbfr6pBNE"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetInvidioIdfromUrl() throws ParsingException {
|
||||
assertEquals("TglNG-yjabU", linkHandler.fromUrl("https://invidio.us/watch?v=TglNG-yjabU").getId());
|
||||
assertEquals("TglNG-yjabU", linkHandler.fromUrl("http://www.invidio.us/watch?v=TglNG-yjabU").getId());
|
||||
assertEquals("TglNG-yjabU", linkHandler.fromUrl("http://invidio.us/watch?v=TglNG-yjabU").getId());
|
||||
assertEquals("3msbfr6pBNE", linkHandler.fromUrl("invidio.us/watch?v=3msbfr6pBNE").getId());
|
||||
assertEquals("ocH3oSnZG3c", linkHandler.fromUrl("https://invidio.us/watch?v=ocH3oSnZG3c&list=PLS2VU1j4vzuZwooPjV26XM9UEBY2CPNn2").getId());
|
||||
assertEquals("ocH3oSnZG3c", linkHandler.fromUrl("https://invidio.us/watch?v=ocH3oSnZG3c&test=PLS2VU1j4vzuZwooPjV26XM9UEBY2CPNn2").getId());
|
||||
assertEquals("3msbfr6pBNE", linkHandler.fromUrl("invidio.us/embed/3msbfr6pBNE").getId());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user