Fix for sync script

This commit is contained in:
Brahim Hadriche committed 2023-01-22 22:37:37 -05:00
1 parent a38c6ebf7f
commit 1366284453
1 file changed
+9 -1
+9 -1
View File
@@ -91,7 +91,15 @@ async function extractVideos(sourceUrl, browser = undefined, limit = 100) {
if (videos.length > limit) {
return;
}
videos.push(data.toString().trim())
newVideos = data.toString()
.split('\n')
.map(video => video.trim())
.filter(i => i);
newVideos.forEach(video => {
videos.push(video)
});
if (videos.length >= limit) {
ytDlpProcess.kill()
}