diff --git a/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractor.java b/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractor.java index 20f520fe..8dbb9ead 100644 --- a/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractor.java +++ b/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractor.java @@ -737,7 +737,8 @@ public class YoutubeStreamExtractor extends StreamExtractor { @Override public String getUploaderName() throws ParsingException { - return li.select("span.g-hovercard").first().text(); + return li.select("span[class*=\"attribution\"").first() + .select("span").first().text(); } @Override diff --git a/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeServiceTest.java b/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeServiceTest.java index 8e29eee6..64b7538b 100644 --- a/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeServiceTest.java +++ b/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeServiceTest.java @@ -53,6 +53,6 @@ public class YoutubeServiceTest { @Test public void testGetDefaultKiosk() throws Exception { - assertEquals(kioskList.getDefaultKioskExtractor(null).getName(), "Trending"); + assertEquals(kioskList.getDefaultKioskExtractor(null).getId(), "Trending"); } } diff --git a/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractorDefaultTest.java b/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractorDefaultTest.java index 44663611..63dfaed0 100644 --- a/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractorDefaultTest.java +++ b/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractorDefaultTest.java @@ -140,6 +140,12 @@ public class YoutubeStreamExtractorDefaultTest { public void testGetRelatedVideos() throws ExtractionException, IOException { StreamInfoItemCollector relatedVideos = extractor.getRelatedVideos(); assertFalse(relatedVideos.getItemList().isEmpty()); + if(!relatedVideos.getErrors().isEmpty()) { + for(Throwable e : relatedVideos.getErrors()) { + e.printStackTrace(); + System.err.println("----------------------"); + } + } assertTrue(relatedVideos.getErrors().isEmpty()); } } diff --git a/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractorGemaTest.java b/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractorGemaTest.java index 7bc1d587..1c64c818 100644 --- a/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractorGemaTest.java +++ b/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractorGemaTest.java @@ -36,10 +36,10 @@ import static org.schabi.newpipe.extractor.ServiceList.YouTube; *
* WARNING: Deactivate this Test Case before uploading it to Github, otherwise CI will fail. */ -@Ignore public class YoutubeStreamExtractorGemaTest { @Test + @Ignore public void testGemaError() throws IOException, ExtractionException { try { NewPipe.init(Downloader.getInstance());