[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;
|
||||
// Check if the video is age restricted
|
||||
if (pageContent.contains("<meta property=\"og:restrictions:age")) {
|
||||
// do this if it is age gated
|
||||
if (!doc.select("meta[property=\"og:restrictions:age\"").isEmpty()) {
|
||||
final EmbeddedInfo info = getEmbeddedInfo();
|
||||
final String videoInfoUrl = getVideoInfoUrl(getId(), info.sts);
|
||||
final String infoPageResponse = downloader.download(videoInfoUrl);
|
||||
|
|
Loading…
Reference in New Issue