Skip to content

Latest commit

 

History

History
22 lines (20 loc) · 809 Bytes

File metadata and controls

22 lines (20 loc) · 809 Bytes

Python Version

requests_html2

HTML Parsing for Humans 项目衍生自requests-html 用法参考expample

相比于requests-html有如下改进:

  • async 请求改用httpx
  • 浏览器渲染改用playwright
  • 元素操作优化,对于元素查找find()xpath()的返回结果,参照linq增加筛选select()where()

Install

pip install requests-html2

Quick Start

from requests_html2 import HTMLSession
with HTMLSession() as session:
    response = session.get('https://python.org/')
    print(response.html)