Skip to content

Commit

Permalink
fix N.pointer exception for getUploaderName()
Browse files Browse the repository at this point in the history
  • Loading branch information
theScrabi committed Oct 31, 2017
1 parent 8baeb3d commit b9d0941
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,8 @@ public String getName() throws ParsingException {

@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ public void testGetKioskAvailableKiosks() throws Exception {

@Test
public void testGetDefaultKiosk() throws Exception {
assertEquals(kioskList.getDefaultKioskExtractor(null).getName(), "Trending");
assertEquals(kioskList.getDefaultKioskExtractor(null).getId(), "Trending");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ public void testGetDashMpd() throws ParsingException {
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());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
* <p>
* 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());
Expand Down

0 comments on commit b9d0941

Please sign in to comment.