agentwx
V2EX  ›  问与答

使用 tornado 这种异步请求框架做爬虫,效率高么?

  •  
  •   agentwx · Jan 17, 2016 · 4274 views
    This topic created in 3793 days ago, the information mentioned may be changed or developed.
    14 replies    2016-01-18 02:27:58 +08:00
    loading
        1
    loading  
       Jan 17, 2016 via Android   ❤️ 1
    爬虫要什么效率…不然大家都不会用 python 写了。
    好写才是重点,很多时候都是网速不给力。
    binux
        2
    binux  
       Jan 17, 2016
    lepture
        3
    lepture  
       Jan 17, 2016
    @loading 所言得之
    Garantion
        4
    Garantion  
       Jan 17, 2016
    celery
    ethego
        5
    ethego  
       Jan 17, 2016
    @loading 正因为网速不给力所以异步带来的效率提升才是惊人的,根本不是你说这的这样。
    ethego
        6
    ethego  
       Jan 17, 2016
    @Garantion celery 不能解决阻塞的问题吧
    Garantion
        7
    Garantion  
       Jan 17, 2016
    @ethego 这个不太清楚 一般我会在调度的时候就尽量考虑阻塞的问题 有什么好办法吗?
    ethego
        8
    ethego  
       Jan 17, 2016
    @Garantion gevent , python3 的话有 asyncio
    Garantion
        9
    Garantion  
       Jan 17, 2016
    @ethego 对对对 你一说这个 我上次偷懒没用 gevent 看来的确要用一下 学习一下 多谢多谢
    loading
        10
    loading  
       Jan 17, 2016 via Android
    @ethego 带宽跑满了,能更快?
    ethego
        11
    ethego  
       Jan 17, 2016
    @loading 如果不开多线程或者协程,能跑满带宽?
    loading
        12
    loading  
       Jan 17, 2016 via Android
    @ethego 我没说不开多线程…你看下楼主问题好吧。
    ethego
        13
    ethego  
       Jan 17, 2016
    @loading 楼主问的是是 tornado ,不是 python , tornado 是通过 ioloop 的方式解决阻塞的问题。
    ericls
        14
    ericls  
       Jan 18, 2016
    是很高的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   893 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 22:20 · PVG 06:20 · LAX 15:20 · JFK 18:20
    ♥ Do have faith in what you're doing.