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.6.1.dev16.tar.gz.

File metadata

File hashes

Hashes for swarmauri_parser_beautifulsoupelement-0.6.1.dev16.tar.gz
Algorithm Hash digest
SHA256 18958626174aadd73d68fe784cf1558df75b7f50641fe7c3b0bc4d35ab3faf4d
MD5 423ce05bfa8e46c60185ba26cd0bf8aa
BLAKE2b-256 3c7898eef15e904e571f0b931e30b1e38acec07658f92f6f1b65dc4d7d298176

See more details on using hashes here.

File details

Details for the file swarmauri_parser_beautifulsoupelement-0.6.1.dev16-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_parser_beautifulsoupelement-0.6.1.dev16-py3-none-any.whl
Algorithm Hash digest
SHA256 cdd8888975fcb13f4a1ab1377bc38ea94e679322774580a3cf382e18b107183a
MD5 060028632bfd8289b1dd645bc69ec540
BLAKE2b-256 d15eddb302cd6c49483e1d81b0afe37d812c200648f8cdb5c8be5d5b0cc2ef40

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