Skip to main content

Zyte's Page Object pattern for web scraping

Project description

PyPI Version Supported Python Versions Build Status Coverage report Documentation Status

web-poet implements Page Object pattern for web scraping. It defines a standard for writing web data extraction code, which allows the code to be portable & reusable.

License is BSD 3-clause.

Installation

pip install web-poet

It requires Python 3.7+.

Overview

web-poet is a library which defines a standard on how to write and organize web data extraction code.

If web scraping code is written as web-poet Page Objects, it can be reused in different contexts. For example, such code can be developed in an IPython notebook, then tested in isolation, and then plugged into a Scrapy spider, or used as a part of some custom aiohttp-based web scraping framework.

Currently, the following integrations are available:

See Documentation for more.

Developing

Setup your local Python environment via:

  1. pip install -r requirements-dev.txt

  2. pre-commit install

Now everytime you perform a git commit, these tools will run against the staged files:

  • black

  • isort

  • flake8

You can also directly invoke pre-commit run –all-files or tox -e linters to run them without performing a commit.

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

web-poet-0.3.0.tar.gz (30.3 kB view hashes)

Uploaded Source

Built Distribution

web_poet-0.3.0-py3-none-any.whl (22.8 kB view hashes)

Uploaded Python 3

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