0
如何在python中的PyCurl(libcurl)模块中实现重试选项?同样的事情也该效果:如何在PyCurl中实现重试选项
卷曲--retry 3 --retry延时5 'http://somesite.com/somefile'
当前代码:
buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://somesite.com/somefile')
with open('output.txt','w') as f:
c.setopt(c.WRITEFUNCTION, f.write)
c.perform()