mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-13 05:40:34 +05:30
fix could not parese metadata despide available error
This commit is contained in:
parent
bad67f0bc3
commit
bf1c771662
@ -135,7 +135,11 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor {
|
||||
Element meta = item.select("div[class=\"yt-lockup-meta\"]").first();
|
||||
if (meta == null) return -1;
|
||||
|
||||
// This case can happen if google releases a special video
|
||||
if(meta.select("li").size() < 2) return -1;
|
||||
|
||||
input = meta.select("li").get(1).text();
|
||||
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
throw new ParsingException("Could not parse yt-lockup-meta although available: " + getUrl(), e);
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ public class YoutubeTrendingExtractorTest {
|
||||
.getKioskList()
|
||||
.getExtractorById("Trending", null);
|
||||
extractor.fetchPage();
|
||||
extractor.setContentCountry("de");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user