Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to get the urls of individual videos in a playlist? #21485

Closed
WillPittenger opened this issue Jun 21, 2019 · 4 comments
Closed

Is there a way to get the urls of individual videos in a playlist? #21485

WillPittenger opened this issue Jun 21, 2019 · 4 comments
Labels

Comments

@WillPittenger
Copy link

@WillPittenger WillPittenger commented Jun 21, 2019

Checklist

  • [ x] I'm asking a question
  • [ x] I've looked through the README and FAQ for similar questions
  • [ x] I've searched the bugtracker for similar questions including closed ones

Question

Suppose I have a playlist P with 3 videos. Because of the possibility of the 2nd video being marked private, market deleted,or not being available in the requested format; I'm thinking of separate calls to youtube-dl for each video. But first, I need the individual urls. This needs to be as though I visited the playlist page and manually copied the individual URLs from there. This needs to work even for videos that can't be downloaded. I can detect errors later.

I ask because I have a PowerShell function that simplifies downloading playlists. I want it to skip invalid videos. If a video isn't available in a given format, I want my function to try other formats and then call ffmpeg to convert.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 21, 2019

--dump-json --flat-playlist.

@dstftw dstftw closed this Jun 21, 2019
@WillPittenger
Copy link
Author

@WillPittenger WillPittenger commented Jun 21, 2019

Thanks.

@abhiank
Copy link

@abhiank abhiank commented Jun 22, 2019

@dstftw How do I save this json output to a file? I tried -
youtube-dl --dump-json --flat-playlist -o /User/username/Desktop/list.json PLFftu4DSZBSwrGiOlZXKHRSoKArsKSuz9

@abhiank
Copy link

@abhiank abhiank commented Jun 22, 2019

Thanks, but I found a way to do that :
youtube-dl --dump-single-json --flat-playlist PLFftu4DSZBSwrGiOlZXKHRSoKArsKSuz9 > /Users/abhimanyu/Desktop/list.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.