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

scrapy 的速度真的很不给力呀?

  •  
  •   xiaoyu9527 · 2017-05-21 18:06:34 +08:00 · 2054 次点击
    这是一个创建于 2532 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我抓一个妹子图。 最大带宽只能跑到 3M。

    感觉并发还是有点少。 能不能加到 50 个并发。

    不是异步的么?

    dsg001
        1
    dsg001  
       2017-05-21 18:38:39 +08:00
    ```python
    # Configure maximum concurrent requests performed by Scrapy (default: 16)
    # CONCURRENT_REQUESTS = 32
    ```
    可以修改配置,但采集的瓶颈从来都不是并发,如果图片下载建议采集网址,之后调用 wget 下载,速度更好
    chendajun
        2
    chendajun  
       2017-05-21 20:24:36 +08:00   ❤️ 1
    个人建议:先把 Scrapy 吃透再说性能问题
    xiaoyu9527
        3
    xiaoyu9527  
    OP
       2017-05-21 22:31:40 +08:00
    @dsg001 我修改了感觉好像是腾讯云的性能的太渣。 并不是 scrapy 的锅。

    因为我国外抓国外开到 32 线程可以跑 100M
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2634 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:34 · PVG 12:34 · LAX 21:34 · JFK 00:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.