V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · Jul 17, 2019 · 2987 views
    This topic created in 2490 days ago, the information mentioned may be changed or developed.
    使用 scrapy 抓取的视频 url,有过期时间,本来自定义在 pipline 写了一个使用 requests 下载( stream=True ),但是发现 scrapy 自带的有下载视频文件。不知道这个下载是否可靠。有大佬用吗。
    4 replies    2019-07-17 16:28:02 +08:00
    ranlele
        1
    ranlele  
    OP
       Jul 17, 2019
    python 下载视频文件,一般都是用什么工具啊。是用的 requests 吗。
    ranlele
        2
    ranlele  
    OP
       Jul 17, 2019
    scrapy FilesPipeline
    locoz
        3
    locoz  
       Jul 17, 2019 via Android
    应该把“视频文件”换成“二进制流”来理解,实际上只要是个 HTTP 客户端库都可以,并没有什么可不可靠的问题。
    locoz
        4
    locoz  
       Jul 17, 2019 via Android
    看了一下 scrapy 的文档,FilesPipeline 完全没问题,用就完事了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4918 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 09:53 · PVG 17:53 · LAX 02:53 · JFK 05:53
    ♥ Do have faith in what you're doing.