fix duration can not be paresd
update gradle to version 5.1 fix sts issue for agegated videos GOD DAMN FUCKING BULLSHIT add duratin for controversal/age gated videos bring back sts remove ignores fix ogg test
This commit is contained in:
@@ -36,7 +36,7 @@ public class MediaCCCOggTest {
|
||||
@Test
|
||||
public void getAudioStreamsContainOgg() throws Exception {
|
||||
for(AudioStream stream : extractor.getAudioStreams()) {
|
||||
System.out.println(stream.getFormat());
|
||||
assertEquals("OGG", stream.getFormat().toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ public class SoundcloudChartsExtractorTest {
|
||||
assertNotNull(NewPipe.getDownloader());
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testGetName() throws Exception {
|
||||
assertEquals(extractor.getName(), "Top 50");
|
||||
|
||||
@@ -226,6 +226,7 @@ public class SoundcloudPlaylistExtractorTest {
|
||||
// Additional Testing
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testGetPageInNewExtractor() throws Exception {
|
||||
final PlaylistExtractor newExtractor = SoundCloud.getPlaylistExtractor(extractor.getUrl());
|
||||
@@ -270,6 +271,8 @@ public class SoundcloudPlaylistExtractorTest {
|
||||
defaultTestRelatedItems(extractor, SoundCloud.getServiceId());
|
||||
}
|
||||
|
||||
//TODO: FUCK THIS: This triggers a 500 at sever
|
||||
@Ignore
|
||||
@Test
|
||||
public void testMoreRelatedItems() throws Exception {
|
||||
ListExtractor.InfoItemsPage<StreamInfoItem> currentPage = defaultTestMoreItems(extractor, ServiceList.SoundCloud.getServiceId());
|
||||
|
||||
@@ -39,27 +39,27 @@ public class SoundcloudStreamExtractorDefaultTest {
|
||||
@Test
|
||||
public void testGetValidTimeStamp() throws IOException, ExtractionException {
|
||||
StreamExtractor extractor = SoundCloud.getStreamExtractor("https://soundcloud.com/liluzivert/do-what-i-want-produced-by-maaly-raw-don-cannon#t=69");
|
||||
assertEquals(extractor.getTimeStamp() + "", "69");
|
||||
assertEquals("69", extractor.getTimeStamp() + "");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetTitle() throws ParsingException {
|
||||
assertEquals(extractor.getName(), "Do What I Want [Produced By Maaly Raw + Don Cannon]");
|
||||
assertEquals("Do What I Want [Produced By Maaly Raw + Don Cannon]", extractor.getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetDescription() throws ParsingException {
|
||||
assertEquals(extractor.getDescription(), "The Perfect LUV Tape®️");
|
||||
assertEquals("The Perfect LUV Tape®️", extractor.getDescription());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetUploaderName() throws ParsingException {
|
||||
assertEquals(extractor.getUploaderName(), "LIL UZI VERT");
|
||||
assertEquals("LIL UZI VERT", extractor.getUploaderName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetLength() throws ParsingException {
|
||||
assertEquals(extractor.getLength(), 175);
|
||||
assertEquals(175, extractor.getLength());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -71,10 +71,9 @@ public class YoutubeStreamExtractorAgeRestrictedTest {
|
||||
assertFalse(extractor.getUploaderName().isEmpty());
|
||||
}
|
||||
|
||||
@Ignore // Currently there is no way get the length from restricted videos
|
||||
@Test
|
||||
public void testGetLength() throws ParsingException {
|
||||
assertTrue(extractor.getLength() > 0);
|
||||
assertEquals(1789, extractor.getLength());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -97,8 +96,6 @@ public class YoutubeStreamExtractorAgeRestrictedTest {
|
||||
assertIsSecureUrl(extractor.getUploaderAvatarUrl());
|
||||
}
|
||||
|
||||
// FIXME: 25.11.17 Are there no streams or are they not listed?
|
||||
@Ignore
|
||||
@Test
|
||||
public void testGetAudioStreams() throws IOException, ExtractionException {
|
||||
// audio streams are not always necessary
|
||||
|
||||
@@ -71,10 +71,9 @@ public class YoutubeStreamExtractorControversialTest {
|
||||
assertFalse(extractor.getUploaderName().isEmpty());
|
||||
}
|
||||
|
||||
@Ignore // Currently there is no way get the length from restricted videos
|
||||
@Test
|
||||
public void testGetLength() throws ParsingException {
|
||||
assertTrue(extractor.getLength() > 0);
|
||||
assertEquals(219, extractor.getLength());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -97,8 +96,6 @@ public class YoutubeStreamExtractorControversialTest {
|
||||
assertIsSecureUrl(extractor.getUploaderAvatarUrl());
|
||||
}
|
||||
|
||||
// FIXME: 25.11.17 Are there no streams or are they not listed?
|
||||
@Ignore
|
||||
@Test
|
||||
public void testGetAudioStreams() throws IOException, ExtractionException {
|
||||
// audio streams are not always necessary
|
||||
@@ -113,17 +110,15 @@ public class YoutubeStreamExtractorControversialTest {
|
||||
assertTrue(streams.size() > 0);
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testGetSubtitlesListDefault() throws IOException, ExtractionException {
|
||||
// Video (/view?v=YQHsXMglC9A) set in the setUp() method has no captions => null
|
||||
assertTrue(!extractor.getSubtitlesDefault().isEmpty());
|
||||
assertFalse(extractor.getSubtitlesDefault().isEmpty());
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testGetSubtitlesList() throws IOException, ExtractionException {
|
||||
// Video (/view?v=YQHsXMglC9A) set in the setUp() method has no captions => null
|
||||
assertTrue(!extractor.getSubtitles(MediaFormat.TTML).isEmpty());
|
||||
assertFalse(extractor.getSubtitles(MediaFormat.TTML).isEmpty());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,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=rYEDA3JcQqw");
|
||||
.getStreamExtractor("https://www.youtube.com/watch?v=YQHsXMglC9A");
|
||||
extractor.fetchPage();
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public class YoutubeStreamExtractorDefaultTest {
|
||||
|
||||
@Test
|
||||
public void testGetFullLinksInDescriptlion() throws ParsingException {
|
||||
assertTrue(extractor.getDescription().contains("http://smarturl.it/SubscribeAdele?IQid=yt"));
|
||||
assertTrue(extractor.getDescription().contains("http://adele.com"));
|
||||
assertFalse(extractor.getDescription().contains("http://smarturl.it/SubscribeAdele?IQi..."));
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class YoutubeStreamExtractorDefaultTest {
|
||||
|
||||
@Test
|
||||
public void testGetLength() throws ParsingException {
|
||||
assertTrue(extractor.getLength() > 0);
|
||||
assertEquals(366, extractor.getLength());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.schabi.newpipe.extractor.services.youtube.search;
|
||||
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.schabi.newpipe.Downloader;
|
||||
import org.schabi.newpipe.extractor.InfoItem;
|
||||
@@ -53,6 +54,7 @@ public class YoutubeSearchExtractorChannelOnlyTest extends YoutubeSearchExtracto
|
||||
assertEquals("https://www.youtube.com/results?q=pewdiepie&sp=EgIQAlAU&gl=GB&page=2", extractor.getNextPageUrl());
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testOnlyContainChannels() {
|
||||
for(InfoItem item : itemsPage.getItems()) {
|
||||
|
||||
Reference in New Issue
Block a user