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.
-j and --write-description now incompatible with each other? #4053
Comments
|
That was an intentional change (see #3036). Since the help message for |
|
OK. Yes, it is easy enough to workaround, using the description in the json data. As for correctness, I'm sure that's in the in the eye of the beholder; given that I wrote my script based on the existing behavior, I liked the old behavior. I take it, then, that the new behavior is intended to be permanent, right? So, I can permanently remove the parts of the script that assume the old behavior? Also, it seems like it should produce at least a warning - to the effect that the combination of options is incompatible - that you're not going to get any output even though you specified --output. Edit: Also note: The old behavior was desirable in at least one respect, which is that the output in the file was cleaner, better formatted, etc than the data in the json dump. I think it was broken up into separate lines and also some escape sequences get expanded - i.e., the json dump contains things like "\n". Because I don't have an old version to test, I can't easily verify this at the moment, but it would be desirable (at least for me) if there were a way to get the old behavior (maybe some speciel switch that says "Yes, I really do want some output along with my json dump". |
|
Actually, after a bit more poking around, I figured out this command line, which gets you pretty close: youtube-dl.py --skip-download --write-info-json --write-descrption -o tmptmp "$url" This gets you a json file and a description file, which is good, except for one little problem. The file created by the --write-info-json option is almost, but not quite, the same as the output you get using "-j". For one thing, there is no _filename option in the --write-info-json file. Not that this in particular is a show-stopper, but it makes you wonder. Why is it slightly different? Just like with the description text - where what you get in the output of "-j" is subtly different from what you get from --write-description. It all makes one wonder… |
…ed in #4053) It's also useful when you use the '--write-info-json' option.
|
Sorry for the delay. In the next version the About the About the description differences, for the test video http://www.youtube.com/watch?v=BaW_jenozKc, they look identical to me: $ youtube-dl test:youtube -j | jq .description -r
test chars: "'/\ä↭𝕐
test URL: https://github.com/rg3/youtube-dl/issues/1892
This is a test video for youtube-dl.
For more information, contact phihag@phihag.de .$ cat youtube-dl\ test\ video\ \'\'_ä↭𝕐-BaW_jenozKc.info.json | jq .description -r
test chars: "'/\ä↭𝕐
test URL: https://github.com/rg3/youtube-dl/issues/1892
This is a test video for youtube-dl.
For more information, contact phihag@phihag.de .$ cat youtube-dl\ test\ video\ \'\'_ä↭𝕐-BaW_jenozKc.mp4.description
test chars: "'/\ä↭𝕐
test URL: https://github.com/rg3/youtube-dl/issues/1892
This is a test video for youtube-dl.
For more information, contact phihag@phihag.de .I think the only difference is that the I'm closing the issue, but feel free to open a new one if you think the description in the json dump has any problem or with any other issue you find. |
|
I believe this issue to be fixed in youtube-dl version 2015.01.30.1 and newer. See our FAQ if you need help updating. |
|
[quote]I believe this issue to be fixed in youtube-dl version 2015.01.30.1 and newer. See our FAQ if you need help updating.[/quote] Two comments:
|
|
OK - thanks for the clarification. No worries there.
No worries. I'm sure other people will notice this same problem and file more formal reports on it. |
I have a script that runs youtube-dl like this:
youtube-dl.py -j --write-description -o tmptmp "$url" | something ...
The objective of the above line is to write the description to the file "tmptmp.description" as well as to write the "json" data to the standard output (it is piped into some further program(s) that analyze the json data).
This was working correctly as recently as October 23rd (2014), but got broken some time after that (in particular, it is broken in the 10/27/2014 version). Now, I get no "tmptmp.description" file. Note that no error message is generated; it just silently ignores it. If I remove "-j" form the command line, then it works as before. So, it seems like it is a "one or the other, but not both" situation.
I would like to see the previous behavior restored. I have work-around-ed it in my script, but I'd prefer it work the way it used to.
Note: This is all on Mac OSX, using the Unix command line.