Skip to main content

Scrapdiver

🌊 Scrapdiver

Advanced Screenscraping & OCR Text Extraction Tool

📖 About

Scrapdiver is a powerful screenscraping utility designed to traverse lists of web pages, capture full-page screenshots, and extract text using Optical Character Recognition (OCR). The extracted text is then systematically stored in local databases for deep content sweeping, archiving, and analysis.

Unlike traditional HTML parsers, Scrapdiver renders the page as a user sees it, making it ideal for bypassing complex JavaScript-heavy layouts, Canvas-rendered text, and anti-scraping DOM obfuscation.

Developed by #asytrick
Available at: github.com/ssmool/scrapdiver
Contact: eusmool@gmail.com


🚀 Installation

Coming Soon! You will soon be able to install the best stable version (v1.0.0) directly via pip:

pip install scrapdiver

For now, you can clone the repository and install the dependencies listed in requirements.txt for your Python console environments.


💻 Usage

Scrapdiver is extremely straightforward to use. Just import the library, set up your SQLite database, queue up your target URLs, and let the diver do the work!

from scrapdiver import *

# Set the SQLite database name
set_db("db.sqlite")

# Add URLs to the task pipe
add_task("https://example.com")
add_task("https://another-example.com")

# Start the screenscraping and OCR extraction process
start_diver()

🤖 The Power of Screenscraping for AI, RAGs, and LLMs

In the era of Artificial Intelligence, clean and accurately contextualized data is paramount. Traditional scraping methods often fail when dealing with modern, dynamically rendered Single Page Applications (SPAs).

How Scrapdiver bridges the gap:

  • Retrieval-Augmented Generation (RAG): RAG systems rely on vast, accurate vector databases. Scrapdiver ensures that the text fed into your embedding models is exactly what the user sees, capturing embedded data in images, charts, and complex UI components through OCR.
  • LLM Pre-training & Fine-tuning: By combining visual context (screenshots) with extracted text, Scrapdiver provides rich, multimodal datasets perfect for fine-tuning Large Language Models.
  • Bypassing DOM Traps: Many modern websites use obfuscated CSS classes and heavily nested div structures to prevent scraping. Because Scrapdiver takes a printscreen and reads it visually, it completely ignores DOM complexities.

💡 Possibilities & Projects

With Scrapdiver, the possibilities are vast. Here are a few project ideas you can build:

  1. Automated Threat Intelligence Feeds: Sweep deep-web forums or visually complex dashboards and extract the text for automated keyword alerting.
  2. Visual Content Auditing: Ensure that UI elements render properly across different resolutions by taking screenshots and confirming the presence of specific textual elements via OCR.
  3. Sentiment Analysis Pipelines: Scrape lists of review sites or comment sections that heavily rely on dynamic loading, store them in SQLite, and run local LLMs to process sentiment.
  4. Historical Archiving Tool: Create a permanent visual and textual archive of volatile web pages (news sites, competitor pricing pages) before they change.
  5. Accessibility Datasets: Build datasets pairing visual web layouts with their textual content to train AI models focused on web accessibility for the visually impaired.

Dive deep into the web with Scrapdiver!

Release files for scrapdiver 1.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 scrapdiver 1.0
File Size Uploaded
scrapdiver-1.0.tar.gz 4.4 kB Details

Built distribution (wheel)

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

Total release size: 8.8 kB

Release files / scrapdiver-1.0.tar.gz

Download URL scrapdiver-1.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4b26fc426eaed621e247406f8457a2a9786fa21ecd1a07ef4d1be8e56734fdfd
BLAKE2b-256 checksum
How to use checksums
23ebee21bf99cf71c515e3c85eae0a00830f2960a1886edbde47453361991c43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release files / scrapdiver-1.0-py3-none-any.whl

Download URL scrapdiver-1.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28b145c87e98872eadacb303166b075e747c75bd0c312ff6a2834c7d6c91756c
BLAKE2b-256 checksum
How to use checksums
a5241e2013220b7858704300ad0cb194bc085a55424c441859eb6de88b2f3350
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

1.0 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