V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
angel725
V2EX  ›  Python

python3 的 pycurl 怎么判断下载完成,并开始一个下载

  •  
  •   angel725 · 2018-09-11 21:40:21 +08:00 · 2780 次点击
    这是一个创建于 2025 天前的主题,其中的信息可能已经有所发展或是发生改变。

    几十个 jar 包。如果存在就跳过,否则下载。

    python3 的 pycurl 怎么判断当前文件已经下载完成,

    然后开始下载下一个。

    3 条回复    2018-09-27 09:38:37 +08:00
    wjidea
        1
    wjidea  
       2018-09-12 04:19:58 +08:00
    import os
    os.path.isfile()
    angel725
        2
    angel725  
    OP
       2018-09-12 11:27:03 +08:00
    isfile 不是判断是否是文件吗。
    用它判断下载完了是什么逻辑
    nbboy
        3
    nbboy  
       2018-09-27 09:38:37 +08:00
    http://pycurl.io/docs/latest/quickstart.html#retrieving-a-network-resource
    阻塞下载的,成功了或者失败就执行下面代码呀。最多你检测一下文件是否完整。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1008 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:16 · PVG 06:16 · LAX 15:16 · JFK 18:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.