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.14.tar.gz (5.6 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.14-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hypotonic-0.0.14.tar.gz
  • Upload date:
  • Size: 5.6 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.14.tar.gz
Algorithm Hash digest
SHA256 5ed278ef85e60231c8be1c960bd100de42b7cad96ef5d94c6d7e7e291d027113
MD5 b1ae7ee349658e974608ed1df4e2c5c6
BLAKE2b-256 6b09227a071fc284ae5d7f9e580c277856be89692e0377da34605d5e3ee8ffa5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hypotonic-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 6.2 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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 da6b303fb4e8d920d26cb22bb81dcc4c4ee3b860edd9e3e0d0517632f5486269
MD5 53cb85bb9741fefc08e9e5a089bca877
BLAKE2b-256 5c2bf7082ebfb61bc23a4c361f71d2cf08877f7af6f131c6ced0aa1c3d862564

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