-
选择下载链接,右键检查,获取到下载的href
image.png -
将链接复制到新的浏览器窗口,观察Network,浏览器地址栏进行请求
image.png -
获得到下载链接url,并且是get请求
image.png - 构建参数发起请求,并写入文件
downloadUrl = 'http://file.mukewang.com/apk/app/112/imooc7.3.110102001android.apk?version=1581500983'
cookie = {
'apsid':'获取到的cookie'
}
response = requests.get(downloadUrl)
with open("mukewang.apk",'wb') as f:
f.write(response.content)
网友评论