1

I was wondering, if there is a way to pass parameters to commands with !, like

source_url = 'https://www.youtube.com/watch?v=lLtaI9-3qfs' #@param {type:"string"}
!youtube-dl source_url -o 'video.mp4'

In this case is throws out a syntax error. Is there even a way to do it?

For those, who are sceptic, this it the right syntax for youtube-dl

!youtube-dl 'https://www.youtube.com/watch?v=lLtaI9-3qfs' -o 'video.mp4'

1 Answer 1

2

You can use {} to pass the variables

!youtube-dl {source_url} -o 'video.mp4'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.