Can use wget package as postet bye @Axel_Erfurt.
If doing it yourself have to look at file header,as url address dos not give away filename or extension.
For this use Requests,or always use Requests and not urllib.
Can aslo do this
If doing it yourself have to look at file header,as url address dos not give away filename or extension.
For this use Requests,or always use Requests and not urllib.
headers['Content-Disposition']
gives info about filename,but the sting is a little messy so have to parse out file name.import requests import re url = 'https://drive.google.com/uc?export=download&id=19LJ6Otr9p_stY5MLeEfRnA-jD8xXvK3m' response = requests.get(url) header = response.headers['Content-Disposition'] file_name = re.search(r'filename="(.*)"', header).group(1) with open(file_name,'wb') as f: f.write(response.content)This give same as wget module
Copy of plink.exe
.Can aslo do this
with open(file_name.split()[-1],'wb') as f:
to just get plink.exe
evilcode Wrote:command = raw_input()No and no use Python 3.6 -->