Zyte's Page Object pattern for web scraping
Project description
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:
Scrapy, via scrapy-poet
See Documentation for more.
Developing
Setup your local Python environment via:
pip install -r requirements-dev.txt
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file web-poet-0.5.1.tar.gz
.
File metadata
- Download URL: web-poet-0.5.1.tar.gz
- Upload date:
- Size: 40.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b02eb8a105e53754466c25b3983de993f6425078a2bbac7ad85e5a17109ea02 |
|
MD5 | 7d77e22022db5ce0d31ae24bac05a7af |
|
BLAKE2b-256 | 5345b6e3224631f25d73acf93c939e17ca2ed474fb94c86fe45b69bfd7481a6b |
Provenance
File details
Details for the file web_poet-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: web_poet-0.5.1-py3-none-any.whl
- Upload date:
- Size: 28.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 846a8675b6ff59952a0bcc7f67aeebd42f59a8edb271cff708cd3d00d2fc7deb |
|
MD5 | 70a3e6d29ebc2d225473b37bd2379f73 |
|
BLAKE2b-256 | 291a4f86122ca32aac4f80cb49de91c0818636fde369498b4d03023cf65ae29b |