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

Uploaded Source

Built Distribution

hypotonic-0.0.15-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

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

Hashes for hypotonic-0.0.15.tar.gz
Algorithm Hash digest
SHA256 56b27bf493841d0f011b6052d1069dc83158c2e3cfde612366ceb6f2b9a573ae
MD5 41936ada87f41eee376ed8058527ef43
BLAKE2b-256 b56766978984c8184f558b63bcd8b4cdc8fd09f5260a02f73b1613b729a34677

See more details on using hashes here.

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

Hashes for hypotonic-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 027eb2d935f27756eb07778a44f727b893faf7e2f13aba18c50193dc5174e72c
MD5 e816152f47c8351a524eb5729338afb9
BLAKE2b-256 e26c668673bc9a26be55e62659b5552bb8f482af44a85e984a41fc57c9b9152d

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