推荐学习书目
› 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
masha
V2EX  ›  Python

运行爬虫的时候 macOS 状态栏卡死

  •  
  •   masha ·
    mashaz · Mar 22, 2017 · 3051 views
    This topic created in 3516 days ago, the information mentioned may be changed or developed.
    爬虫运行的时候 状态栏如下图卡死(系统自带的状态卡死,第三方不受印象)

    * 渣画质见谅,那个圆圈卡死的鼠标状态竟然不能被 QuickTime 截到,于是手机远远的拍的(破 6s 近处已无法对焦)
    下面是这个爬虫 import 的包



    ## 系统 10.12.2 , python2.7
    7 replies  •  2017-04-10 23:21:31 +08:00
    xshwy
    xshwy
    Mar 22, 2017
    1
    前排小板凳围观大神根据 import 判断卡死原因
    masha
    masha
    OP
    Mar 22, 2017 via iPhone
    2
    @xshwy 不好意思我才是小白,你对这个原因有见解的话可以直接发表,我只能这样猜测了,因为这个爬虫和我其他爬虫唯一不同的地方就是 import 的不同了。而这个是我写到现在唯一一个因为长时间运行而卡死状态栏的
    masha
    masha
    OP
    Mar 22, 2017 via iPhone
    3
    @masha 每次长时间运行都会卡
    xshwy
    xshwy
    Mar 22, 2017
    4
    @masha 哎嗨嗨 不好意思 我也是菜鸟,我认为光从 import ,看不出卡的问题出在哪儿;最好是贴出你的代码,让大神分析一下哪里出了问题。
    xray887
    xray887
    Mar 22, 2017
    5
    估计,你的 webdriver 开多了,并且没有关闭,导致系统资源紧张,导致卡死现象。建议检查一下 webdriver 有没有 close 掉。
    VicYu
    VicYu
    Mar 22, 2017
    6
    @masha 电脑配置,内存太小? selenium 用的那个 browser ,起了多少个线程,一个任务结束调用 close 没有?等等
    masha
    masha
    OP
    Apr 10, 2017 via iPhone
    7
    @xray887 @VicYu 不好意思都忘了这么个帖子了,谢谢回复,都排查过不是这些原因
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2254 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 11:20 · PVG 19:20 · LAX 03:20 · JFK 06:20
    ♥ Do have faith in what you're doing.