Fast asynchronous web scraper with minimalist API.
Project description
Hypotonic
Fast asynchronous web scraper with minimalist API inspired by awesome node-osmosis.
Hypotonic provides SQLAlchemy-like command chaining DSL to define HTML scrapers. Everything is executed asynchronously via asyncio
and all dependencies are pure Python. Supports querying by CSS selectors with Scrapy's pseudo-attributes. XPath is not supported due to libxml
requirement.
Hypotonic does not natively execute JavaScript on websites and it is recommended to use prerender.
Installing
Hypotonic requires Python 3.6+.
pip install hypotonic
Example
from hypotonic import Hypotonic
data, errors = (
Hypotonic()
.get('http://books.toscrape.com/')
.paginate('.next a::attr(href)', 5)
.find('.product_pod h3')
.set('title')
.follow('a::attr(href)')
.set({'price': '.price_color',
'availability': 'p.availability'})
.data()
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hypotonic-0.0.15.tar.gz
.
File metadata
- Download URL: hypotonic-0.0.15.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56b27bf493841d0f011b6052d1069dc83158c2e3cfde612366ceb6f2b9a573ae |
|
MD5 | 41936ada87f41eee376ed8058527ef43 |
|
BLAKE2b-256 | b56766978984c8184f558b63bcd8b4cdc8fd09f5260a02f73b1613b729a34677 |
File details
Details for the file hypotonic-0.0.15-py3-none-any.whl
.
File metadata
- Download URL: hypotonic-0.0.15-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 027eb2d935f27756eb07778a44f727b893faf7e2f13aba18c50193dc5174e72c |
|
MD5 | e816152f47c8351a524eb5729338afb9 |
|
BLAKE2b-256 | e26c668673bc9a26be55e62659b5552bb8f482af44a85e984a41fc57c9b9152d |