Score:0

Can you include logic in youtube-dl's --output parameter?

ca flag

For youtube-dl, I have a script that has an --output value that looks like:

"%(uploader)s/%(playlist_title)s/%(upload_date)s - %(title)s/%(upload_date)s - %(title)s [%(id)s].%(ext)s"

Sometimes I download individual videos, not playlists or channels; I'd like to use the same script. Is there a way to put an if statement or some other logical expression to say "ignore the playlist title if there isn't one" instead of it defaulting to "NA"?

ChanganAuto avatar
us flag
Why do you want to use a script written for playlists if you aren't downloading playlists?
ca flag
Because the difference between the "playlist" version and the "not-playlist" version is mostly a matter of `--output`. I can adjust that easily; I'm mainly wondering about how versatile the `--output` parameter is.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.