npmytd 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli.js +7 -1
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -38,7 +38,13 @@ async function main() {
|
|
|
38
38
|
try {
|
|
39
39
|
videoInfo = await ytdl.getInfo(url);
|
|
40
40
|
} catch (error) {
|
|
41
|
-
|
|
41
|
+
if (error.message.includes('Could not extract functions')) {
|
|
42
|
+
console.error(chalk.red(`Error fetching video information: ${error.message}`));
|
|
43
|
+
console.error(chalk.yellow(`This often happens when YouTube updates its website, temporarily breaking the downloader.
|
|
44
|
+
Please try again later, or check the 'ytdl-core' GitHub page for updates.`));
|
|
45
|
+
} else {
|
|
46
|
+
console.error(chalk.red('Error fetching video information:', error.message));
|
|
47
|
+
}
|
|
42
48
|
process.exit(1);
|
|
43
49
|
}
|
|
44
50
|
const suggestedFilename = sanitizeFilename(videoInfo.videoDetails.title);
|