ytdl-core
Advanced tools
Comparing version 0.12.0 to 0.12.1
@@ -56,9 +56,9 @@ var urllib = require('url'); | ||
// Check if this video exists. | ||
// Check if there are any errors with this video page. | ||
var unavailableMsg = util.between(body, '<div id="player-unavailable"', '>'); | ||
if (!/\bhid\b/.test(util.between(unavailableMsg, 'class="', '"'))) { | ||
unavailableMsg = util.between(body, '<h1 id="unavailable-message" class="message">', '</h1>').trim(); | ||
// Getting around age restricted videos. | ||
if (unavailableMsg !== 'Content Warning') { | ||
return callback(new Error(unavailableMsg)); | ||
// Ignore error about age restriction. | ||
if (body.indexOf('<div id="watch7-player-age-gate-content"') < 0) { | ||
return callback(new Error(util.between(body, | ||
'<h1 id="unavailable-message" class="message">', '</h1>').trim())); | ||
} | ||
@@ -65,0 +65,0 @@ } |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.12.0", | ||
"version": "0.12.1", | ||
"repository": { | ||
@@ -12,0 +12,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60149