mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-14 06:10:33 +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();
|
Element meta = item.select("div[class=\"yt-lockup-meta\"]").first();
|
||||||
if (meta == null) return -1;
|
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();
|
input = meta.select("li").get(1).text();
|
||||||
|
|
||||||
} catch (IndexOutOfBoundsException e) {
|
} catch (IndexOutOfBoundsException e) {
|
||||||
throw new ParsingException("Could not parse yt-lockup-meta although available: " + getUrl(), e);
|
throw new ParsingException("Could not parse yt-lockup-meta although available: " + getUrl(), e);
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ public class YoutubeTrendingExtractorTest {
|
|||||||
.getKioskList()
|
.getKioskList()
|
||||||
.getExtractorById("Trending", null);
|
.getExtractorById("Trending", null);
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
|
extractor.setContentCountry("de");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user