preface
Before we talked about file upload, of course there is a file download
Procedure For downloading files
Very simple, the binary format of the response content to the local file, according to the format of the file to download the file name
1 down_url = 'https://www.imooc.com/mobile/appdown'
2 res = requests.post(down_url).content
3 with open("F:/imooc.apk", "wb") as f:
4 f.write(res)
Copy the code