Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Ritvik Saraf
2018-10-19 20:09:51 +05:30
15 changed files with 53 additions and 74 deletions

View File

@@ -177,7 +177,7 @@ public class YoutubeStreamExtractorDefaultTest {
public static void setUp() throws Exception {
NewPipe.init(Downloader.getInstance(), new Localization("GB", "en"));
extractor = (YoutubeStreamExtractor) YouTube
.getStreamExtractor("https://www.youtube.com/watch?v=LzR8Sf5PK2Q");
.getStreamExtractor("https://www.youtube.com/watch?v=fBc4Q_htqPg");
extractor.fetchPage();
}

View File

@@ -51,7 +51,6 @@ public class YoutubeTrendingExtractorTest {
.getKioskList()
.getExtractorById("Trending", null);
extractor.fetchPage();
extractor.setContentCountry("de");
}
@Test

View File

@@ -46,7 +46,7 @@ public class YoutubeTrendingKioskInfoTest {
StreamingService service = YouTube;
LinkHandlerFactory LinkHandlerFactory = service.getKioskList().getListLinkHandlerFactoryByType("Trending");
kioskInfo = KioskInfo.getInfo(YouTube, LinkHandlerFactory.fromId("Trending").getUrl(), null);
kioskInfo = KioskInfo.getInfo(YouTube, LinkHandlerFactory.fromId("Trending").getUrl());
}
@Test

View File

@@ -45,12 +45,12 @@ public class YoutubeSearchExtractorChannelOnlyTest extends YoutubeSearchExtracto
}
assertFalse("First and second page are equal", equals);
assertEquals("https://www.youtube.com/results?q=pewdiepie&sp=EgIQAlAU&page=3", secondPage.getNextPageUrl());
assertEquals("https://www.youtube.com/results?q=pewdiepie&sp=EgIQAlAU&page=3&gl=GB", secondPage.getNextPageUrl());
}
@Test
public void testGetSecondPageUrl() throws Exception {
assertEquals("https://www.youtube.com/results?q=pewdiepie&sp=EgIQAlAU&page=2", extractor.getNextPageUrl());
assertEquals("https://www.youtube.com/results?q=pewdiepie&sp=EgIQAlAU&page=2&gl=GB", extractor.getNextPageUrl());
}
@Test

View File

@@ -53,12 +53,12 @@ public class YoutubeSearchExtractorDefaultTest extends YoutubeSearchExtractorBas
@Test
public void testGetSecondPageUrl() throws Exception {
assertEquals("https://www.youtube.com/results?q=pewdiepie&page=2", extractor.getNextPageUrl());
assertEquals("https://www.youtube.com/results?q=pewdiepie&page=2&gl=GB", extractor.getNextPageUrl());
}
@Test
public void testResultList_FirstElement() {
InfoItem firstInfoItem = itemsPage.getItems().get(0);
InfoItem firstInfoItem = itemsPage.getItems().get(1);
// THe channel should be the first item
assertTrue(firstInfoItem instanceof ChannelInfoItem);
@@ -96,7 +96,7 @@ public class YoutubeSearchExtractorDefaultTest extends YoutubeSearchExtractorBas
}
assertFalse("First and second page are equal", equals);
assertEquals("https://www.youtube.com/results?q=pewdiepie&page=3", secondPage.getNextPageUrl());
assertEquals("https://www.youtube.com/results?q=pewdiepie&page=3&gl=GB", secondPage.getNextPageUrl());
}
@Test