Skip to content

Commit fce324d

Browse files
committed
fix playlist banner foo
1 parent b113062 commit fce324d

2 files changed

Lines changed: 4 additions & 15 deletions

File tree

src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubePlaylistExtractor.java

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,9 @@ public String getThumbnailUrl() throws ParsingException {
7474
}
7575

7676
@Override
77-
public String getBannerUrl() throws ParsingException {
78-
try {
79-
Element el = doc.select("div[id=\"gh-banner\"] style").first();
80-
String cssContent = el.html();
81-
String url = "https:" + Parser.matchGroup1("url\\((.*)\\)", cssContent);
82-
if (url.contains("s.ytimg.com")) {
83-
return null;
84-
} else {
85-
return url.substring(0, url.indexOf(");"));
86-
}
87-
88-
89-
} catch (Exception e) {
90-
throw new ParsingException("Could not get playlist Banner");
91-
}
77+
public String getBannerUrl() {
78+
return ""; // Banner can't be handled by frontend right now.
79+
// Whoever is willing to implement this should also implement this in the fornt end
9280
}
9381

9482
@Override

src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubePlaylistExtractorTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public void testGetThumbnailUrl() throws Exception {
5555

5656
@Test
5757
public void testGetBannerUrl() throws Exception {
58+
System.out.println(extractor.getBannerUrl());
5859
assertTrue(extractor.getBannerUrl(), extractor.getBannerUrl().contains("yt"));
5960
}
6061

0 commit comments

Comments
 (0)