Skip to main content

BeautifulSoup Element Parser for Swarmauri.

Project description

Swarmauri Logo

PyPI - Downloads PyPI - Python Version PyPI - License PyPI - Version


BeautifulSoup Element Parser

A specialized parser that utilizes BeautifulSoup to extract specific HTML elements and their content from HTML documents.

Installation

pip install swarmauri_parser_beautifulsoupelement

Usage

The BeautifulSoupElementParser allows you to extract specific HTML elements from HTML content:

from swarmauri_parser_beautifulsoupelement.BeautifulSoupElementParser import BeautifulSoupElementParser

# Create a parser instance to extract paragraphs
parser = BeautifulSoupElementParser(element="p")

# HTML content to parse
html_content = "<div><p>First paragraph</p><p>Second paragraph</p></div>"

# Parse the content
documents = parser.parse(html_content)

# Access the extracted elements
for doc in documents:
    print(doc.content)  # Prints each paragraph element

Want to help?

If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.

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

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file swarmauri_parser_beautifulsoupelement-0.7.0.dev3.tar.gz.

File metadata

File hashes

Hashes for swarmauri_parser_beautifulsoupelement-0.7.0.dev3.tar.gz
Algorithm Hash digest
SHA256 afcb97b52e1b63fad21f94bca8ea1eef5d60e5b9bd79bd907b6c76a4b9010e12
MD5 db61eea11a1591f7ada9c8d68c03761c
BLAKE2b-256 4e6275a2eb7607a9e4a5800d64a060f51b2d0f009d79916dc492c571177cde38

See more details on using hashes here.

File details

Details for the file swarmauri_parser_beautifulsoupelement-0.7.0.dev3-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_parser_beautifulsoupelement-0.7.0.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 280b4d794a9c3b8868374425b19acc02a35b4e4fd8d153638e4a83a62c35d942
MD5 cb2686785300632315141c04db517e09
BLAKE2b-256 538faa6f77e8f05d791d2a5fac0366240e63024b1f8afbc241f8e74ca0f39903

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