Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hypotonic-0.0.11.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

hypotonic-0.0.11-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file hypotonic-0.0.11.tar.gz.

File metadata

  • Download URL: hypotonic-0.0.11.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.6.12 Linux/5.3.0-1035-azure

File hashes

Hashes for hypotonic-0.0.11.tar.gz
Algorithm Hash digest
SHA256 f92fb7c6c7500b4b17683c2c32e5975c1f0214f9826ee35a6ee89cf8187ef3c7
MD5 95bb01c5a4330da0e5329228689fe7ef
BLAKE2b-256 8a59dd3afb39cdc62c47e576e340507ac4075585eea2f6f61459ebb60a27fcd0

See more details on using hashes here.

File details

Details for the file hypotonic-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: hypotonic-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.6.12 Linux/5.3.0-1035-azure

File hashes

Hashes for hypotonic-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 75845f4bd3dbac8357cb46d6029f958d2104cd35f3ef5708c47cc0059a55d096
MD5 76899b3d8ae6d830c9652d890799c436
BLAKE2b-256 d4795b3cf519d95a2897419586c68144fa2c2a7aa2ae97f1989ceac989e956c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page