ytdl-core
Advanced tools
Comparing version 4.9.0 to 4.9.1
@@ -25,3 +25,3 @@ /** | ||
]); | ||
const validPathDomains = /^https?:\/\/(youtu\.be\/|(www\.)?youtube.com\/(embed|v|shorts)\/)/; | ||
const validPathDomains = /^https?:\/\/(youtu\.be\/|(www\.)?youtube\.com\/(embed|v|shorts)\/)/; | ||
exports.getURLVideoID = link => { | ||
@@ -32,3 +32,3 @@ const parsed = new URL(link); | ||
const paths = parsed.pathname.split('/'); | ||
id = paths[paths.length - 1]; | ||
id = parsed.host === 'youtu.be' ? paths[1] : paths[2]; | ||
} else if (parsed.hostname && !validQueryDomains.has(parsed.hostname)) { | ||
@@ -35,0 +35,0 @@ throw Error('Not a YouTube domain'); |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "4.9.0", | ||
"version": "4.9.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
96195