[YouTube] Make detection of age restricted pages more reliable
This commit is contained in:
parent
91c360df5e
commit
9a325b280d
|
@ -626,8 +626,7 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
||||||
|
|
||||||
final String playerUrl;
|
final String playerUrl;
|
||||||
// Check if the video is age restricted
|
// Check if the video is age restricted
|
||||||
if (pageContent.contains("<meta property=\"og:restrictions:age")) {
|
if (!doc.select("meta[property=\"og:restrictions:age\"").isEmpty()) {
|
||||||
// do this if it is age gated
|
|
||||||
final EmbeddedInfo info = getEmbeddedInfo();
|
final EmbeddedInfo info = getEmbeddedInfo();
|
||||||
final String videoInfoUrl = getVideoInfoUrl(getId(), info.sts);
|
final String videoInfoUrl = getVideoInfoUrl(getId(), info.sts);
|
||||||
final String infoPageResponse = downloader.download(videoInfoUrl);
|
final String infoPageResponse = downloader.download(videoInfoUrl);
|
||||||
|
|
Loading…
Reference in New Issue