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.12.tar.gz (5.3 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.12-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hypotonic-0.0.12.tar.gz
Algorithm Hash digest
SHA256 6f335e3835b512aa5f5aef85dd0e0fb5a4d7fe8f9d184f190ef29a12748db344
MD5 555679961375f513035f2cb2ab1fc032
BLAKE2b-256 012d8e2d0bce90f3a2c8501fa232e925df218d0aa48e6ba8a079fbb150236977

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for hypotonic-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 8b873e48449b5798a7712578fd08a9a131a0d6a0206239b8c98cdb5df44e0c3d
MD5 439a993c325b4001cbf6617a85097754
BLAKE2b-256 f8a6bc94920bb634e970a2d97d94a609c59af927115bbfbb173cc3b09204865f

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