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

Python 下,用 try......except 检测页面元素,但是等待时间很长

  •  
  •   pythonbryan · Dec 20, 2017 · 2942 views
    This topic created in 3248 days ago, the information mentioned may be changed or developed.

    检测页面的元素是否存在,不存在的话就直接跳过,进入正常的语句。报错其实应该很快,但是不知道为什么会过很久才跳到下一个语句。不知道问题出在哪里,大家遇到过吗?

    6 replies  •  2017-12-28 22:22:47 +08:00
    lavenKin
    lavenKin
    Dec 20, 2017
    1
    开局一标题,内容全靠猜
    kuaidanian
    kuaidanian
    Dec 20, 2017
    2
    要等待页面元素加载完,应该有个超时时间吧
    cominghome
    cominghome
    Dec 20, 2017
    3
    @lavenKin 还真是,这描述谁知道发生了什么
    julyclyde
    julyclyde
    Dec 20, 2017
    4
    估计是分不清服务器端和客户端,误以为页面是交互式运行的
    TesterCC
    TesterCC
    Dec 21, 2017
    5
    @lavenKin 他应该是在做自动化测试。
    Kylin30
    Kylin30
    Dec 28, 2017
    6
    我的土办法,加 print,看脚本正在搞什么。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2268 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 14:03 · PVG 22:03 · LAX 06:03 · JFK 09:03
    ♥ Do have faith in what you're doing.