dirkf
dirkf
The Wat stuff has been obsolete for some time. This stuff was ported from upstream, where: ```console $ git blame -L 51 youtube_dl/extractor/wat.py Blaming lines: 100% (57/57), done. ... 8244288dfe...
More or less. See https://github.com/ytdl-org/youtube-dl/issues/32299#issuecomment-1596234196.
If it's still valid, which fix?
Ah, fine. That's already in the new wat-free TF1 extractor for yt-dl.
In the problem case `requested_formats` is a list of 2 items. `--print '%(requested_formats.1)j'` outputs the `[1]` item as JSON, as expected. Neither `--print '%(requested_formats.1)l'` nor `--print '%(requested_formats.1)#l'` output the `[1]`...
That explains why it's not described as CSV in the doc, then! `list(itertools.chain(*dct.items()))` seems reasonable to me (k1, v1, k2, v2, ...), but I have no standing. Nested objects as...
If _jq_ doesn't know how to do it, maybe there isn't a good solution.
>... for some unknown reason `requested_formats` behaves differently than `requested_formats.1` It's just that `requested_formats` is a list, while `requested_formats.1` is a `dict`, seen by the exporting code as the list...
Related: https://github.com/ytdl-org/youtube-dl/issues/30060
This site tries hard to help us by providing valid HTML5 media but we ignore it (same extractor code in yt-dl, apart from conventions). Extraction using HTML5 can be forced...