I have wget downloaded in the folder, and I run the following command:
wget.exe -i link_goes_here.mp4 -c -nc -P "K:\Folder\of\Saved\videos"
Is there any way to have this run inside a Python script so I don't have to manually run this command? I have a Python script that has:
print(link)
I'm wondering if there is any way to have the wget perform its download after that print occurs?
Here is the script I am working with:
while True:
try:
file=open('recent.txt','a', buffering=1)
try:
response=[]
response=requests.get(API_link,proxies=proxies,headers=headers).text.split('[')[1].split(']')[0]
response=response.split(',')
for i in response:
temp=''
temp=i.split('"')[1].split('"')[0]
if temp not in list_:
link=''
link=starting_part+temp+".mp4"
print(link)
file.write(link)
file.write('\n')
list_+=[temp]
file.close()
sleep(5)
except:
continue
print(len(list_))
except requests.ConnectionError:
continue
except requests.exceptions.Timeout:
continue
else:
#print('Something happened\n')
continue