一、代码实例

import requests
#下载apk url
url = 'http://xxx/xxxx/xxx.apk'
headers = {
        'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15      (KHTML, like Gecko) Version/13.1 Safari/605.1.15',
    }
#发送请求
r = requests.get(url=url,headers=headers)
#apk存储路径
path = "/Users/xxxx//python/pack/app/"
file_path = os.path.join(path,apkname)
#存储
with open(file_path,'wb') as output:
    output.write(r.content)

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2021-08-12
  • 2022-02-19
猜你喜欢
  • 2021-08-23
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-11-20
相关资源
相似解决方案