V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
dingyaguang117
V2EX  ›  问与答

gevent 的 patch_all() 已经对 requests 无效了?

  •  
  •   dingyaguang117 · Jul 31, 2015 · 1291 views
    This topic created in 3924 days ago, the information mentioned may be changed or developed.
    我记得去年我做爬虫的时候,还是可以的啊, 下面的代码跑起来极其慢,应该是socket阻塞了

    这个下面的回答似乎有问题
    http://stackoverflow.com/questions/9501663/how-enable-requests-async-mode

    另外我看requests官方文档都推荐了 grequests
    Supplement 1  ·  Jul 31, 2015
    看了一下grequest的源码,发现跟我的做法是一样的

    https://github.com/kennethreitz/grequests/blob/master/grequests.py
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4371 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 150ms · UTC 04:12 · PVG 12:12 · LAX 21:12 · JFK 00:12
    ♥ Do have faith in what you're doing.