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

Uploaded Python 3

File details

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

File metadata

  • Download URL: hypotonic-0.0.10.tar.gz
  • Upload date:
  • Size: 5.0 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.10.tar.gz
Algorithm Hash digest
SHA256 e97bf473ac75f2c73655b3293cb9297ed99d684d6e21bdc0af8e97fa0438cc65
MD5 332ac67ae7f8b3d08ddc0a5eab0ea8ee
BLAKE2b-256 ec308b69ee28f8dcce9b46039f45392fcf88c3deac77f83a862b7b811a573d04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hypotonic-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 9291956d45bfdd97e383a98b51165601fb036812dc9ba253a9b710754981d2f7
MD5 6a2d3c510debc5a78ba9e473f79a8275
BLAKE2b-256 b49ba230b9ee08e1f81dc3f7ae674532f699fb3655072b7ef83820856524a9d4

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