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

Uploaded Source

Built Distribution

hypotonic-0.0.9-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hypotonic-0.0.9.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.9.tar.gz
Algorithm Hash digest
SHA256 695c39567f67f657d44b2e9131959fca36a3a2c6dd69e0f20d4758fe03a59320
MD5 4a7f31cb6c7414326a92703e418c8786
BLAKE2b-256 7ff5211ede0394b28d9fba3b17c2c24c42290326be83295eac455d5fc47a8998

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hypotonic-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 406969209f9dd7400f2e63c2825687998ad0c42b4474c47da77ffef8e8913bdc
MD5 7f3263b2f13ec9bafe78d5d2e9d67a8b
BLAKE2b-256 1ea02a16bff5b76049a7b153fa91fd6b1ac7c487bf95f3bc3e8768de4b417e26

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