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

Add option for getting number of videos of a channel/user #5727

Closed
nikhilchopra1 opened this issue May 16, 2015 · 10 comments
Closed

Add option for getting number of videos of a channel/user #5727

nikhilchopra1 opened this issue May 16, 2015 · 10 comments
Labels

Comments

@nikhilchopra1
Copy link

@nikhilchopra1 nikhilchopra1 commented May 16, 2015

Is there any way to check how many videos has a channel/user uploaded ?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 16, 2015

Using the json output with jq:

$ youtube-dl 'https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re' -J --flat-playlist | jq '.entries | length'
3
@jaimeMF jaimeMF closed this May 16, 2015
@nikhilchopra1
Copy link
Author

@nikhilchopra1 nikhilchopra1 commented May 16, 2015

Not a single playlist. All uploads by user.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 16, 2015

The same command works:

$ youtube-dl 'https://www.youtube.com/user/TheLinuxFoundation' -J --flat-playlist | jq '.entries | length'
693
@nikhilchopra1
Copy link
Author

@nikhilchopra1 nikhilchopra1 commented May 16, 2015

Is it possible to create some short code ? Like --nov (number of videos) ?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 16, 2015

If it can be easily done by chaining two commands, I don't think it's really needed. Why isn't enough for you?

@nikhilchopra1
Copy link
Author

@nikhilchopra1 nikhilchopra1 commented May 16, 2015

Would be convenient .Who wants to type long command every time ? . Sorry if I sound rude. It's justa a suggestion .

@nikhilchopra1
Copy link
Author

@nikhilchopra1 nikhilchopra1 commented May 16, 2015

It gives an error. jq is not recognized as an internal or external command.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 16, 2015

My main reason agains adding a new options is that we would have to add an option for every single feature that people need. On the other side when you build something generic like the json output you give complete flexibility for what you can do and you don't need to modify youtube-dl for most of things (there will of course always be features that require new options).

It gives an error. jq is not recognized as an internal or external command.

You have to install jq

@jaimeMF jaimeMF reopened this May 16, 2015
@jaimeMF jaimeMF changed the title Get number of videos of a channel/user Add option for getting number of videos of a channel/user May 16, 2015
@nikhilchopra1
Copy link
Author

@nikhilchopra1 nikhilchopra1 commented May 16, 2015

Okay. Sorry. Actually I currently use the -F option . It downloads all the pages. Then gives like " Download video 1 or 500".I see the end number and close the window .If it was possible to store the "500" into some variable then output it. But it is a slow method. But doesn't require external software. ( Sorry I am not a coder . Method may sound stupid ).

@nikhilchopra1
Copy link
Author

@nikhilchopra1 nikhilchopra1 commented May 16, 2015

Actually I use this method for most sites. I regularly download full youtube channels and vine channel. It works for vine too.

@jaimeMF jaimeMF added the request label May 16, 2015
@dstftw dstftw closed this Apr 15, 2018
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.