File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,7 +135,11 @@ public long getViewCount() throws ParsingException {
135135 Element meta = item .select ("div[class=\" yt-lockup-meta\" ]" ).first ();
136136 if (meta == null ) return -1 ;
137137
138+ // This case can happen if google releases a special video
139+ if (meta .select ("li" ).size () < 2 ) return -1 ;
140+
138141 input = meta .select ("li" ).get (1 ).text ();
142+
139143 } catch (IndexOutOfBoundsException e ) {
140144 throw new ParsingException ("Could not parse yt-lockup-meta although available: " + getUrl (), e );
141145 }
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ public static void setUp() throws Exception {
4848 .getKioskList ()
4949 .getExtractorById ("Trending" , null );
5050 extractor .fetchPage ();
51+ extractor .setContentCountry ("de" );
5152 }
5253
5354 @ Test
You can’t perform that action at this time.
0 commit comments