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

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

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

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

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