Skip to main content

RAGScraper

RAGScraper is a simple Python package that scrapes webpages and converts them to markdown format for RAG usage.

Installation

To install RAGScraper, simply run:

pip install ragscraper

Usage

To use RAGScraper as a command-line tool:

rag-scraper <URL>

To use RAGScraper in a Python script:

from rag_scraper.scraper import Scraper
from rag_scraper.converter import Converter

# Fetch HTML content
url = "https://example.com"
html_content = Scraper.fetch_html(url)

# Convert to Markdown
markdown_content = Converter.html_to_markdown(
    html=html_content, 
    base_url=base_url,
    parser_features='html.parser', 
    ignore_links=True
)
print(markdown_content)

Development

To run the tests for RAGScraper, navigate to the package directory and run:

python -m unittest discover tests

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Metadata

Release files for RAGScraper 11.5.2023

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

Source distribution (sdist)

Source distribution for RAGScraper 11.5.2023
File Size Uploaded
ragscraper-11.5.2023.tar.gz 3.9 kB Details

Built distribution (wheel)

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

Total release size: 9.2 kB

Release files / ragscraper-11.5.2023.tar.gz

Download URL ragscraper-11.5.2023.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
aea8b6d9f9c8ce77691ec9d964ae5dd6dff94ac84af11482738909a4013a23e7
BLAKE2b-256 checksum
How to use checksums
80f6e9fc7786ac640671feb7b99c358fb3c4282e154d1718e12b09995f706376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.12 Linux/5.15.90.1-microsoft-standard-WSL2

Release files / ragscraper-11.5.2023-py3-none-any.whl

Download URL ragscraper-11.5.2023-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1c4553ea6b80634015d7674aaeeb3aff50d440abe604e10973d267f19bd5466
BLAKE2b-256 checksum
How to use checksums
5a0f86f9e2aa26551b6e86d28892170f5480c3fef36e107e855667afd15e639e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.12 Linux/5.15.90.1-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

11.5.2023 This release

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