ytdl-core
Advanced tools
Comparing version 0.7.18 to 0.7.19
@@ -220,3 +220,7 @@ var qs = require('querystring'); | ||
*/ | ||
var idRegex = /^[a-zA-Z0-9-_]{11}$/; | ||
exports.getVideoID = function(link) { | ||
if (idRegex.test(link)) { | ||
return link; | ||
} | ||
var parsed = url.parse(link, true); | ||
@@ -223,0 +227,0 @@ var id = parsed.query.v; |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.7.18", | ||
"version": "0.7.19", | ||
"repository": { | ||
@@ -12,0 +12,0 @@ "type": "git", |
@@ -233,2 +233,4 @@ var util = require('../lib/util'); | ||
assert(id, 'VIDEO_ID'); | ||
id = util.getVideoID('RAW_VIDEOID'); // Video ids are 11-character long | ||
assert(id, 'RAW_VIDEOID'); | ||
}); | ||
@@ -235,0 +237,0 @@ }); |
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
11945749
57513