download comments into separate comments.json file
See original GitHub issueChecklist
- I’m reporting a feature request
- I’ve verified that I’m running yt-dlp version 2021.12.27. (update instructions)
- I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
proposal
Rather than embedding site comments into the video.info.json
file, it would be helpful to (perhaps optionally?) download them into a separate comments.json
file.
rationale
- In my opinion the comments dont’t belong there semantically. (We wouldn’t embed subtitles in video.info.json either.)
- This gives the user more freedom in handling the data. For example, the user could convert the comments.json into some other human-readable format and then delete comments.json while keeping the video’s proper json data.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
JSON Comment Example — How to Comment in JSON Files
A way to skirt around the comments issue is to add data to your JSON file that function as comments. ... Here's another...
Read more >Can comments be used in JSON? - Stack Overflow
No. JSON is data-only. If you include a comment, then it must be data too. You could have a designated data element called...
Read more >Can we use comments in a JSON file? - Aram Koukia
Well the short answer is: No! Comments of the form //… or /*…*/ are not allowed in JSON. This answer is based on...
Read more >5+ Ways and Tools for Adding Comments in JSON - Medium
In this article, we'll learn how to use comments in JSON files. We'll see workarounds and methods used by developers to add single-line...
Read more >How can I add comments in JSON? - O'Reilly
The first option presented is an external tool, JSMin. By stripping the code before publishing for production, comments are removed with the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Now you can do
Eg:
Additionally, it seems that
--print-to-file
cannot create folders. It creates the file if it doesn’t yet exist, but if the path to the file does not yet exist, it is not created, the whole process simply fails with[Errno 2] No such file or directory
.