File tree Expand file tree Collapse file tree
main/java/org/schabi/newpipe/extractor/services/youtube Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments