最新消息:

使用python 下载小红伞病毒库实例

脚本专区 永恒心锁 1401浏览 0评论
import urllib
import urllib2
import requests
import urllib
import urllib2
import requests

url = 'http://dl.antivir.de/package/fusebundle/win32/int/vdf_fusebundle.zip'

print "downloading with urllib"
urllib.urlretrieve(url, "code.zip")

print "downloading with urllib2"
f = urllib2.urlopen(url)
data = f.read()
with open("code2.zip", "wb") as code:
 code.write(data)

print "downloading with requests"
r = requests.get(url)
with open("code3.zip", "wb") as code:
 code.write(r.content
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » 使用python 下载小红伞病毒库实例

您必须 登录 才能发表评论!