
requests-html
Python library for parsing HTML and running JavaScript-rendered pages, built on requests.
- Stars
- 13.8k
- Forks
- 995
- Licence
- MIT
- Language
- Python
- Last update
- 2.6 years ago
- Type
- Library
No commits in over a year — check for forks or alternatives before adopting.
What it is
requests-html is a Python library for fetching web pages and pulling information out of their HTML using CSS selectors. It is built on top of the requests HTTP library, so its interface will feel familiar if you already use requests. The project's description calls it Pythonic HTML parsing for humans, and its topics list lxml, pyquery and BeautifulSoup as related tools.
- Fetch a web page with requests and select elements using CSS selectors
- Extract text, links or attributes from the HTML of a page
- Compare its selector-based approach with BeautifulSoup or pyquery for a small scraper
Great for
- Python developers who already use requests and want to parse HTML in the same style
- Small scraping scripts that pull a few fields from pages
- People learning how web scraping with CSS selectors works
Not ideal for
- Large-scale crawling, since the README excerpt provided gives no performance or concurrency details
- Projects that need a long-term maintained dependency, since the last push shown is April 2024 and the README was not available to confirm current status
How to get it
- 1
Install with a package manager
You'll need: Python
Clone the repository
git clone https://github.com/psf/requests-html.git - 2
Run it
- Install the library with pip or your preferred Python package manager
- Import HTML and requests in a Python script
- Fetch a page and query it with a CSS selector
- 3
Get the most out of it
- Read the project homepage at html.python-requests.org for documentation
- Compare the topic-listed libraries (lxml, pyquery, BeautifulSoup) if you need features beyond this one
Downloads
Strengths
- Familiar API for anyone who has used the requests library
- Uses CSS selectors to find elements in a page
- MIT licensed with a large community following (13,804 stars)
Trade-offs
- The README excerpt was empty, so feature details and current maintenance status are not confirmed here
- Latest release v0.10.0 ships without binaries and the last push date is April 2024
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| requests-html (this) | 13.8k | Library | beginner | 2.6 years ago | Python developers who already use requests and want to parse HTML in the same style |
| jsoup | 11.4k | Library | intermediate | 8 days ago | Java developers who need to scrape or extract data from web pages |
| cheerio | 30.5k | Library | beginner | 4 days ago | JavaScript developers who already know jQuery-style selectors |
| bootstrap | 175k | Library | beginner | 4 days ago | Developers building responsive websites or web app interfaces quickly |
| docling | 70k | Library | beginner | 5 days ago | Python developers building retrieval or RAG pipelines over PDFs and office files |
| bulma | 50k | Library | beginner | 2 months ago | Developers who want a quick, consistent styling baseline for a web page |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.