Open kal-asther opened 2 days ago
You can either get a python dict using the api or use -j
to get a json string of the extracted info.
You can either get a python dict using the api or use
-j
to get a json string of the extracted info.
Sorry, forgot to update this. I read a thread about (not exactly) the same thing, and it led me to a command that would output a custom json string.
Which led me to use the output command -O to acquire the results in json and then picked the fields that are most important to me.
Which then led me to this command yt-dlp -O "%(.{id,title,formats})#j" "url"
Hope it helps anybody looking for the same thing.
Edit: I would just leave this open for a bit as to maybe chance on someone with a better alternative.
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Please make sure the question is worded well enough to be understood
I would like to gather just the id's and formats, and specifically if they're audio_only and video_only.
I'm making a gui for it through a website for personal use, since my old-timer relatives need something with a relative(pun intended) ease-of-use. This way I can just parse the Json into javascript objects and display them there via their formats, just one of mp4, webm(av1 if possible), mp3, and aac for audio. And one of each video resolution for both webm and mp4.
Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output
No response