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
ranlele
V2EX  ›  Python

scrapy FilesPipeline 下载视频文件问题

  •  1
     
  •   ranlele · 2019-07-17 10:41:34 +08:00 · 2164 次点击
    这是一个创建于 1716 天前的主题,其中的信息可能已经有所发展或是发生改变。
    使用 scrapy 抓取的视频 url,有过期时间,本来自定义在 pipline 写了一个使用 requests 下载( stream=True ),但是发现 scrapy 自带的有下载视频文件。不知道这个下载是否可靠。有大佬用吗。
    4 条回复    2019-07-17 16:28:02 +08:00
    ranlele
        1
    ranlele  
    OP
       2019-07-17 10:54:23 +08:00
    python 下载视频文件,一般都是用什么工具啊。是用的 requests 吗。
    ranlele
        2
    ranlele  
    OP
       2019-07-17 11:09:57 +08:00
    scrapy FilesPipeline
    locoz
        3
    locoz  
       2019-07-17 16:26:38 +08:00 via Android
    应该把“视频文件”换成“二进制流”来理解,实际上只要是个 HTTP 客户端库都可以,并没有什么可不可靠的问题。
    locoz
        4
    locoz  
       2019-07-17 16:28:02 +08:00 via Android
    看了一下 scrapy 的文档,FilesPipeline 完全没问题,用就完事了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   951 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 21:22 · PVG 05:22 · LAX 14:22 · JFK 17:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.