Skip to main content

itemloaders

PyPI Version Supported Python Versions CI Status Coverage report Documentation Status

itemloaders is a library that helps you collect data from HTML and XML sources.

It comes in handy to extract data from web pages, as it supports data extraction using CSS and XPath Selectors.

It’s specially useful when you need to standardize the data from many sources. For example, it allows you to have all your casting and parsing rules in a single place.

Here is an example to get you started:

from itemloaders import ItemLoader
from parsel import Selector

html_data = '''
<!DOCTYPE html>
<html>
    <head>
        <title>Some random product page</title>
    </head>
    <body>
        <div class="product_name">Some random product page</div>
        <p id="price">$ 100.12</p>
    </body>
</html>
'''
loader = ItemLoader(selector=Selector(html_data))
loader.add_xpath('name', '//div[@class="product_name"]/text()')
loader.add_xpath('name', '//div[@class="product_title"]/text()')
loader.add_css('price', '#price::text')
loader.add_value('last_updated', 'today') # you can also use literal values
item = loader.load_item()
item
# {'name': ['Some random product page'], 'price': ['$ 100.12'], 'last_updated': ['today']}

For more information, check out the documentation.

Contributing

All contributions are welcome!

  • If you want to review some code, check open Pull Requests here

  • If you want to submit a code change

    • File an issue here, if there isn’t one yet

    • Fork this repository

    • Create a branch to work on your changes

    • Run pre-commit install to install pre-commit hooks

    • Push your local branch and submit a Pull Request

Metadata

Release files for itemloaders 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for itemloaders 1.5.0
File Size Uploaded
itemloaders-1.5.0.tar.gz 36.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for itemloaders 1.5.0
File Interpreter ABI Platform
itemloaders-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 49.8 kB

Release files / itemloaders-1.5.0.tar.gz

Download URL itemloaders-1.5.0.tar.gz
Size 36.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e6feec5e44e92e1931dbd70fce4da430491ee4cbc9a93a725351e4f0d614a411
BLAKE2b-256 checksum
How to use checksums
af38a235115b71aea5e3104e627e2e00f664232a8e9faaa7aa63b1469a893b86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / itemloaders-1.5.0-py3-none-any.whl

Download URL itemloaders-1.5.0-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d57a4e5b204a1f88affdc6e03ed2f4f60ad7f3b7cc90f5914af92c9b52e46efb
BLAKE2b-256 checksum
How to use checksums
7ead44f03332459d62d921e62b76b4bd699382ee5e7aa29b7d9fc7be934a8341
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page