Building a string and running it in terminal python -


Hey guys, I'm making a dragon script to download YouTube videos. I know that I can do it in the basic Linux scripting language, but I am trying to learn how to work the scripts in Ajnathan because I use the windows from my work.

Import OS print ("start script .... \ n") link = raw_input ('add link \ n')

Name = name = raw_input (add a name with 'flv extension \ n') Command = 'Wget -O' + name + '$ (youtube-dl -g' + link + ')' os.system ("command")

I think there are simple ("") problems how can I write it to work?

Thank you!

Your problem is that you have

  os.system ( "Command")  

which is trying to run "command" instead of the wget command

  import The name of the OS print ("script is starting .... \ n") link = raw_input ('add link \ n') name = name = raw_input ('name with flv extension \ n') command = 'wget - O '+ name +' $ (youtube-dl -g '+ link +') 'os.system (command)  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -