推荐学习书目
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 · May 21, 2017 · 2505 views
    This topic created in 3299 days ago, the information mentioned may be changed or developed.

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

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

    不是异步的么?

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

    因为我国外抓国外开到 32 线程可以跑 100M
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1135 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 23:03 · PVG 07:03 · LAX 16:03 · JFK 19:03
    ♥ Do have faith in what you're doing.