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 is ultra-fast thanks to lxml parser. Supports querying by XPath or CSS selectors.

Hypotonic does not natively execute JavaScript on websites and it is recommended to use prerender.

Installing

Hypotonic requires Python 3.6+ and libxml2 C library.

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hypotonic-0.0.8-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hypotonic-0.0.8.tar.gz
Algorithm Hash digest
SHA256 7dac97cf0a1dc0a4527cf39f2e6f417b5aafac493b91975f1b6fa7cb38533f71
MD5 67db498ecfebc7fd2abdefc9cef18a0c
BLAKE2b-256 8b2efb92278ee176f4456e07890137d85035cd959fd9b87b1b3277f1a78549fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hypotonic-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.7.1 Darwin/19.6.0

File hashes

Hashes for hypotonic-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 ac6ac3ef578caf19b4788c6f7d34b8fea94b345ccdd3c9ed609a5531ceebbd16
MD5 d7cd0199320f853d5740ef9ac2500030
BLAKE2b-256 223e2bbf5e5e17b079a0fe682271d2d44c2eb297448876e2139a5380895fa4f8

See more details on using hashes here.

Supported by

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