2
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-09-01 14:55:26 +00:00

Merge pull request #192 from gzsombor/fix-illegal-expression

Fix 'java.lang.IllegalArgumentException
This commit is contained in:
Tobias Groza
2019-09-03 09:12:21 +02:00
committed by GitHub

View File

@@ -61,7 +61,7 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor {
@Override @Override
public String getUrl() throws ParsingException { public String getUrl() throws ParsingException {
try { try {
Element el = item.select("div[class*=\"yt-lockup-video\"").first(); Element el = item.select("div[class*=\"yt-lockup-video\"]").first();
Element dl = el.select("h3").first().select("a").first(); Element dl = el.select("h3").first().select("a").first();
return dl.attr("abs:href"); return dl.attr("abs:href");
} catch (Exception e) { } catch (Exception e) {
@@ -72,7 +72,7 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor {
@Override @Override
public String getName() throws ParsingException { public String getName() throws ParsingException {
try { try {
Element el = item.select("div[class*=\"yt-lockup-video\"").first(); Element el = item.select("div[class*=\"yt-lockup-video\"]").first();
Element dl = el.select("h3").first().select("a").first(); Element dl = el.select("h3").first().select("a").first();
return dl.text(); return dl.text();
} catch (Exception e) { } catch (Exception e) {