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

用 IE 打开的网页,如何读取其中的内容

  •  
  •   eric13517 · Jul 9, 2015 · 2909 views
    This topic created in 3944 days ago, the information mentioned may be changed or developed.
    python新手,刚自学,打算先自己做个小工具玩:

    某个只能用IE访问的网页,上面有一些动态变化的信息,我想写个Python小工具,定时检查IE打开的这个页面上的内容,符合一定条件时,在该页面的一个输入框输入一串数字并点击旁边的提交按钮。

    模拟键盘输入和鼠标点击已经会了,但现在不会读取IE打开的页面上的内容,我原以为打开的网页,可以用FindWindowEx查找IE的子窗口的句柄,并从窗口句柄获取信息,但试了下不行,哪位高手指点一下,怎么读取这样的页面中的内容。
    2 replies    2015-07-09 23:22:32 +08:00
    slimhigh
        1
    slimhigh  
       Jul 9, 2015
    你可以尝试用Selenium来做哦。
    http://www.seleniumhq.org/docs/03_webdriver.jsp
    nanlou
        2
    nanlou  
       Jul 9, 2015
    selenium watir都可以的。。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5955 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 03:32 · PVG 11:32 · LAX 20:32 · JFK 23:32
    ♥ Do have faith in what you're doing.