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

request-html 库,能不能对页面上的“对象”进行点击操作?

  •  
  •   uti6770werty · Oct 13, 2019 · 3290 views
    This topic created in 2539 days ago, the information mentioned may be changed or developed.

    以前用 selenium 时:

            driver.find_element_by_id('tabmenuA').click()
            time.sleep(1)
            OtherHtmlPage = driver.page_source
    

    这样就获得了 OtherHtmlPage 这个经过点击表格 tab,然后也经过 WebDriver 渲染的页面代码了

    不清楚 request-html 库能不能这么操作? 看过官方的文档,好像也没这样的例子...,只是知道作者在 request 的基础上似乎能对网页渲染支持很好...

    arrow8899
        1
    arrow8899  
       Oct 14, 2019
    不支持的,老老实实用 selenium。
    locoz
        2
    locoz  
       Oct 14, 2019
    本来就是基于 pyppeteer 做的页面渲染效果,自己魔改一下就可以了。
    4BVL25L90W260T9U
        3
    4BVL25L90W260T9U  
       Oct 14, 2019
    不要用这种垃圾库,越封装越烂
    ClericPy
        4
    ClericPy  
       Oct 14, 2019
    作者都跑路了, 为什么还要用它... 趁早换个简简单单的 cdp 库吧, 直接注入个 js 就点击了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2538 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 04:37 · PVG 12:37 · LAX 21:37 · JFK 00:37
    ♥ Do have faith in what you're doing.