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

多线程爬虫抓小说

  •  
  •   ljdawn · Sep 6, 2015 · 6143 views
    This topic created in 3885 days ago, the information mentioned may be changed or developed.

    写了个多线程爬虫,感觉自己好无耻呀。。。 之前写了个单线程的,任务丢到 rq 里面去去,真的很慢,两千多个网页,跑了半天。 这个也跑了小班天。。。。。 https://github.com/ljdawn/python_share/blob/master/biquge_spider.py

    13 replies    2015-10-02 03:29:31 +08:00
    ljdawn
        1
    ljdawn  
    OP
       Sep 6, 2015
    rq 那个没放是因为。。。这个是抓得 CL 呀。哈哈哈哈哈哈
    sivacohan
        2
    sivacohan  
    PRO
       Sep 7, 2015 via Android
    用 gevent 保平安
    je11yfish
        3
    je11yfish  
       Sep 7, 2015
    楼主,这事儿用 Gevent 是王道啊……
    ljdawn
        4
    ljdawn  
    OP
       Sep 7, 2015
    @sivacohan 周末来一发 么么哒
    ljdawn
        5
    ljdawn  
    OP
       Sep 7, 2015
    @je11yfish 周末来一发。 么么哒
    LeoQ
        6
    LeoQ  
       Sep 7, 2015
    楼上这么赤裸裸的求 YP ,哈哈哈
    cooiky
        7
    cooiky  
       Sep 7, 2015
    "Referer":"http://cl.loius.biz/"

    这是亮点?
    800126
        8
    800126  
       Sep 7, 2015
    @LeoQ 哥,我只是来追随你的头像的。
    ljdawn
        9
    ljdawn  
    OP
       Sep 7, 2015
    @cooiky 哈哈哈哈 我那会儿用的是另外一个域名。。。
    ljdawn
        10
    ljdawn  
    OP
       Sep 7, 2015
    @LeoQ 亚灭爹。。。。 来一发不是这个意思。。是说用 gevent 。。。 你太邪恶了哈哈哈
    ThisDay
        11
    ThisDay  
       Sep 7, 2015
    "Referer":"http://cl.loius.biz/"
    说!是不是去抓过图片!还是成人文学?
    ljdawn
        12
    ljdawn  
    OP
       Sep 7, 2015
    @leeyuzhe 抓得小说哈哈哈哈
    symons
        13
    symons  
       Oct 2, 2015
    为啥不用多进程,要用多线程,请教一下
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4159 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 83ms · UTC 05:24 · PVG 13:24 · LAX 22:24 · JFK 01:24
    ♥ Do have faith in what you're doing.