I have a simple python script. I’m trying to use subprocess.run to call an external program, pass arguments and then use a previously established input function to download a file from a URL, but I can’t seem to get the URL to work.
Here it is:
<code>import requests
import os
import subprocess
MPD1 = input("URL: ")
subprocess.run(['ytdlp.exe', ' --allow-u --downloader aria2c -f bv,ba', MPD1])
</code>
<code>import requests
import os
import subprocess
MPD1 = input("URL: ")
subprocess.run(['ytdlp.exe', ' --allow-u --downloader aria2c -f bv,ba', MPD1])
</code>
import requests
import os
import subprocess
MPD1 = input("URL: ")
subprocess.run(['ytdlp.exe', ' --allow-u --downloader aria2c -f bv,ba', MPD1])
I need the MPD1 to remain as an input function because that is the only variable that changes for each use.
But I get an error every time. How can I pass this function after calling the other program and it’s arguments?
Thanks
1