mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-14 06:10:33 +05:30
Use Exception instead of Throwable (more consistent)
This commit is contained in:
parent
db3596c818
commit
35921345d9
@ -66,14 +66,14 @@ public class YoutubeChannelInfoItemExtractor implements ChannelInfoItemExtractor
|
|||||||
if (match.matches()) {
|
if (match.matches()) {
|
||||||
return YoutubeChannelExtractor.CHANNEL_URL_BASE + match.group(1);
|
return YoutubeChannelExtractor.CHANNEL_URL_BASE + match.group(1);
|
||||||
}
|
}
|
||||||
} catch(Throwable ignored) {}
|
} catch(Exception ignored) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// fallback method just in case youtube changes things; it should never run and tests will fail
|
// fallback method just in case youtube changes things; it should never run and tests will fail
|
||||||
// provides an url with "/user/NAME", that is inconsistent with stream and channel extractor
|
// provides an url with "/user/NAME", that is inconsistent with stream and channel extractor
|
||||||
return el.select("a[class*=\"yt-uix-tile-link\"]").first()
|
return el.select("a[class*=\"yt-uix-tile-link\"]").first()
|
||||||
.attr("abs:href");
|
.attr("abs:href");
|
||||||
} catch (Throwable e) {
|
} catch (Exception e) {
|
||||||
throw new ParsingException("Could not get channel url", e);
|
throw new ParsingException("Could not get channel url", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user