Downloading Youtube videos in a text file…?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















If you are familiar to Linux, see the following script...



I have a text file with a (list.txt) of Youtube URLs separated by new line... and I use



cat list.txt | youtube-dl -f best 


to download all in the list



This works fine but I want to emulate it on a Windows Batch file..



set /p data=<list.txt
youtube-dl -f best %data%


This works too.. BUT it downloads only the first video on the list.



A Simple solution w.r.t coding would be preferred.



PS:Also it is certain that I'm not looking for solutions using youtube-dl commands










share|improve this question




















  • 1





    Why don't you just use youtube-dl -a list.txt?

    – Attie
    Mar 6 at 14:06











  • @Attie Okay, you may write it as an answer.

    – user720745
    Mar 6 at 14:09











  • What did you mean "not looking for solutions using youtube-dl commands"?

    – Attie
    Mar 6 at 15:37


















0















If you are familiar to Linux, see the following script...



I have a text file with a (list.txt) of Youtube URLs separated by new line... and I use



cat list.txt | youtube-dl -f best 


to download all in the list



This works fine but I want to emulate it on a Windows Batch file..



set /p data=<list.txt
youtube-dl -f best %data%


This works too.. BUT it downloads only the first video on the list.



A Simple solution w.r.t coding would be preferred.



PS:Also it is certain that I'm not looking for solutions using youtube-dl commands










share|improve this question




















  • 1





    Why don't you just use youtube-dl -a list.txt?

    – Attie
    Mar 6 at 14:06











  • @Attie Okay, you may write it as an answer.

    – user720745
    Mar 6 at 14:09











  • What did you mean "not looking for solutions using youtube-dl commands"?

    – Attie
    Mar 6 at 15:37














0












0








0








If you are familiar to Linux, see the following script...



I have a text file with a (list.txt) of Youtube URLs separated by new line... and I use



cat list.txt | youtube-dl -f best 


to download all in the list



This works fine but I want to emulate it on a Windows Batch file..



set /p data=<list.txt
youtube-dl -f best %data%


This works too.. BUT it downloads only the first video on the list.



A Simple solution w.r.t coding would be preferred.



PS:Also it is certain that I'm not looking for solutions using youtube-dl commands










share|improve this question
















If you are familiar to Linux, see the following script...



I have a text file with a (list.txt) of Youtube URLs separated by new line... and I use



cat list.txt | youtube-dl -f best 


to download all in the list



This works fine but I want to emulate it on a Windows Batch file..



set /p data=<list.txt
youtube-dl -f best %data%


This works too.. BUT it downloads only the first video on the list.



A Simple solution w.r.t coding would be preferred.



PS:Also it is certain that I'm not looking for solutions using youtube-dl commands







batch shell-script youtube pipe






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 6 at 14:07

























asked Mar 6 at 14:05







user720745















  • 1





    Why don't you just use youtube-dl -a list.txt?

    – Attie
    Mar 6 at 14:06











  • @Attie Okay, you may write it as an answer.

    – user720745
    Mar 6 at 14:09











  • What did you mean "not looking for solutions using youtube-dl commands"?

    – Attie
    Mar 6 at 15:37














  • 1





    Why don't you just use youtube-dl -a list.txt?

    – Attie
    Mar 6 at 14:06











  • @Attie Okay, you may write it as an answer.

    – user720745
    Mar 6 at 14:09











  • What did you mean "not looking for solutions using youtube-dl commands"?

    – Attie
    Mar 6 at 15:37








1




1





Why don't you just use youtube-dl -a list.txt?

– Attie
Mar 6 at 14:06





Why don't you just use youtube-dl -a list.txt?

– Attie
Mar 6 at 14:06













@Attie Okay, you may write it as an answer.

– user720745
Mar 6 at 14:09





@Attie Okay, you may write it as an answer.

– user720745
Mar 6 at 14:09













What did you mean "not looking for solutions using youtube-dl commands"?

– Attie
Mar 6 at 15:37





What did you mean "not looking for solutions using youtube-dl commands"?

– Attie
Mar 6 at 15:37










1 Answer
1






active

oldest

votes


















2














Rather than piping it in, you could use functionality provided by youtube-dl - it has a parameter that allows you to point at a text file containing a list of URLs - one per line.




-a, --batch-file FILE



File containing URLs to download ('-' for stdin), one URL per line. Lines starting with '#', ';' or ']' are considered as comments and ignored.




In your situation you'd use:



youtube-dl -f best -a list.txt





share|improve this answer
























  • This seems to me as being the best answer for it uses the original tool to do the same and there is a Windows version too. So basically all you need to do is reformat your command according to the answer provided by Attie and just put it in a folder with a batch script and relevant list file. Then all you'll have to do is edit your list file and run your script. Otherwise, though I don't know it properly, I'd suggest looking on PowerShell side. From what I saw it seems they at last included a lot of nice features and commands.

    – 猫IT
    Mar 6 at 16:53












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1411804%2fdownloading-youtube-videos-in-a-text-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown
























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














Rather than piping it in, you could use functionality provided by youtube-dl - it has a parameter that allows you to point at a text file containing a list of URLs - one per line.




-a, --batch-file FILE



File containing URLs to download ('-' for stdin), one URL per line. Lines starting with '#', ';' or ']' are considered as comments and ignored.




In your situation you'd use:



youtube-dl -f best -a list.txt





share|improve this answer
























  • This seems to me as being the best answer for it uses the original tool to do the same and there is a Windows version too. So basically all you need to do is reformat your command according to the answer provided by Attie and just put it in a folder with a batch script and relevant list file. Then all you'll have to do is edit your list file and run your script. Otherwise, though I don't know it properly, I'd suggest looking on PowerShell side. From what I saw it seems they at last included a lot of nice features and commands.

    – 猫IT
    Mar 6 at 16:53
















2














Rather than piping it in, you could use functionality provided by youtube-dl - it has a parameter that allows you to point at a text file containing a list of URLs - one per line.




-a, --batch-file FILE



File containing URLs to download ('-' for stdin), one URL per line. Lines starting with '#', ';' or ']' are considered as comments and ignored.




In your situation you'd use:



youtube-dl -f best -a list.txt





share|improve this answer
























  • This seems to me as being the best answer for it uses the original tool to do the same and there is a Windows version too. So basically all you need to do is reformat your command according to the answer provided by Attie and just put it in a folder with a batch script and relevant list file. Then all you'll have to do is edit your list file and run your script. Otherwise, though I don't know it properly, I'd suggest looking on PowerShell side. From what I saw it seems they at last included a lot of nice features and commands.

    – 猫IT
    Mar 6 at 16:53














2












2








2







Rather than piping it in, you could use functionality provided by youtube-dl - it has a parameter that allows you to point at a text file containing a list of URLs - one per line.




-a, --batch-file FILE



File containing URLs to download ('-' for stdin), one URL per line. Lines starting with '#', ';' or ']' are considered as comments and ignored.




In your situation you'd use:



youtube-dl -f best -a list.txt





share|improve this answer













Rather than piping it in, you could use functionality provided by youtube-dl - it has a parameter that allows you to point at a text file containing a list of URLs - one per line.




-a, --batch-file FILE



File containing URLs to download ('-' for stdin), one URL per line. Lines starting with '#', ';' or ']' are considered as comments and ignored.




In your situation you'd use:



youtube-dl -f best -a list.txt






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 6 at 15:36









AttieAttie

13.3k43648




13.3k43648













  • This seems to me as being the best answer for it uses the original tool to do the same and there is a Windows version too. So basically all you need to do is reformat your command according to the answer provided by Attie and just put it in a folder with a batch script and relevant list file. Then all you'll have to do is edit your list file and run your script. Otherwise, though I don't know it properly, I'd suggest looking on PowerShell side. From what I saw it seems they at last included a lot of nice features and commands.

    – 猫IT
    Mar 6 at 16:53



















  • This seems to me as being the best answer for it uses the original tool to do the same and there is a Windows version too. So basically all you need to do is reformat your command according to the answer provided by Attie and just put it in a folder with a batch script and relevant list file. Then all you'll have to do is edit your list file and run your script. Otherwise, though I don't know it properly, I'd suggest looking on PowerShell side. From what I saw it seems they at last included a lot of nice features and commands.

    – 猫IT
    Mar 6 at 16:53

















This seems to me as being the best answer for it uses the original tool to do the same and there is a Windows version too. So basically all you need to do is reformat your command according to the answer provided by Attie and just put it in a folder with a batch script and relevant list file. Then all you'll have to do is edit your list file and run your script. Otherwise, though I don't know it properly, I'd suggest looking on PowerShell side. From what I saw it seems they at last included a lot of nice features and commands.

– 猫IT
Mar 6 at 16:53





This seems to me as being the best answer for it uses the original tool to do the same and there is a Windows version too. So basically all you need to do is reformat your command according to the answer provided by Attie and just put it in a folder with a batch script and relevant list file. Then all you'll have to do is edit your list file and run your script. Otherwise, though I don't know it properly, I'd suggest looking on PowerShell side. From what I saw it seems they at last included a lot of nice features and commands.

– 猫IT
Mar 6 at 16:53


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1411804%2fdownloading-youtube-videos-in-a-text-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Aardman Animations

Are they similar matrix

“minimization” problem in Euclidean space related to orthonormal basis