Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
How to download youtube playlist info using youtube-dl in a python program? #21505
Comments
|
Arguments are bools not strings. |
|
Oh thank you @dstftw. That was a really silly mistake Ps. It worked! |
|
Hey @dstftw, I'm stuck again. I'm unable to capture the json output into a variable. In the current code, result only has a value of 0 and not the json which I was expecting. How do I do that? |
|
When downloading, 0 means success. Anything else means an error. (Classic C behavior.) You were on the right track, |
|
Thank you @silverbacknet |
Checklist
Question
I'm trying to download info about all items in a youtube playlist. I've figured out the command to execute on the terminal but I'm unable to figure out its equivalent code when embedded in a python program.
Here's the terminal command I use :
youtube-dl --dump-single-json --flat-playlist PLFftu4DSZBSwrGiOlZXKHRSoKArsKSuz9 > /Users/abhimanyu/Desktop/list.jsonHere's how far I got in embedded python :
I also tried
ydl.extract_infobut that starts fetching info about each video individually which I don't need.