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

about --get-thumbnail #4225

Closed
ghost opened this issue Nov 17, 2014 · 1 comment
Closed

about --get-thumbnail #4225

ghost opened this issue Nov 17, 2014 · 1 comment

Comments

@ghost
Copy link

@ghost ghost commented Nov 17, 2014

I usually work with youtube-dl output with a linux script for parsing data output. When youtube-dl don't find a thumbnail in the given link, wouldn't it be better to show "null" text or null line(\n)? I give an example to better understanding. If I run:

youtube-dl -g --get-title --get-id --get-format --get-thumbnail --get-filename --all-formats http://www.marca.com/2014/11/17/futbol/seleccion/1416230388.html

Output is:
WARNING: Falling back on generic information extractor.
¿Qué jugador alemán se parece a Raúl, según Casillas? - MARCA.com
video
http://k.uecdn.es/p/110/sp/0/playManifest/entryId/0_jui4h43j/format/url/flavorId/0_fu49nzrj/video.mp4
¿Qué jugador alemán se parece a Raúl, según Casillas - MARCA.com-video.mp4
0 - unknown

That output gives (in order): title, id, video link, filename and format, but not the thumbnail link that I requested. I think that would be better to have a predictable output of (in this case) 6 lines, because that way would better to manage output for post-processing tasks, something like:
title
id
video_link
(null) or NOT_FOUND or "\n"
filename
format

Thank you.

@phihag
Copy link
Contributor

@phihag phihag commented Nov 17, 2014

If you have that much output, I strongly recommend using the --dump-json option instead. It sounds like you are parsing it anyways, so that should also simplify the parsing itself.

@phihag phihag closed this Nov 17, 2014
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
1 participant
You can’t perform that action at this time.