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.13.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

hypotonic-0.0.13-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hypotonic-0.0.13.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Darwin/19.6.0

File hashes

Hashes for hypotonic-0.0.13.tar.gz
Algorithm Hash digest
SHA256 c13ee16ba8a4fc390c30215a493a1022825b59a72ac0b63d02c1d80417520510
MD5 360f1385a74a25655b815a6cc7623f98
BLAKE2b-256 4ede4ce106d0465197e5c0439635b551cb2a267b4f5ff8a29bb9422ce640ecce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hypotonic-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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

Hashes for hypotonic-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 4a33fe8b4ea812ad1b31614eb4e698465d25d0233ad31c566dd9621801f287a1
MD5 5f28ae0e5ad638b345b574e110fe1508
BLAKE2b-256 c6f28280219b7e4eef1c67d521c7040782c8cd00c31b9db624b77744dd35cc3b

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