A multi-modal web scraping package for extracting text, images, audio, and video.
Project description
๐ฎ morphscrapper
A sophisticated, multi-modal web scraping and media conversion suite for Python.
๐ Overview
morphscrapper is a modular Python package designed to extract and convert diverse content types from the web. It bridges the gap between raw web scraping and advanced media processing, allowing developers to extract text, images, audio, and video resources, and immediately perform operations like OCR (Optical Character Recognition), speech recognition, and video manipulation.
It features a robust Python API, a full-featured Command-Line Interface (CLI), and a modern, light-themed Neo-Brutalism web dashboard for interactive scraping and conversion.
๐ ๏ธ Tech Stack & Dependencies
morphscrapper leverages modern, reliable Python libraries:
| Layer | Technology | Icons / Badges |
|---|---|---|
| Core Scraping | requests, BeautifulSoup4 |
|
| OCR Engine | pytesseract, Pillow (Tesseract OCR wrapper) |
|
| Speech-to-Text | SpeechRecognition, pydub |
|
| Video Processing | moviepy (FFmpeg-powered) |
|
| Web Dashboard | Flask, Vanilla HTML5, CSS3, JavaScript |
โจ Features
- ๐ Document Text Scraping โ Extracts clean, structural content from websites.
- ๐ผ๏ธ Image Scraping & Filtering โ Locates all image formats, with options to download specific extensions or package them into ZIPs on-demand.
- ๐ต Audio & Video Extraction โ Finds direct media tracks and embeds.
- ๐ค Optical Character Recognition (OCR) โ Extracts text from local or scraped image files using Tesseract OCR.
- ๐ค Speech Transcription โ Transcribes WAV/MP3 files into readable text.
- ๐๏ธ Video Manipulation โ Converts video clips to audio tracks, extracts frames at custom intervals, or transcribes speech within video tracks.
- ๐ป Desktop CLI โ Clean command parser with JSON, CSV, and TXT exporting formats.
- ๐ Web UI โ A modern web dashboard built around high-contrast Neo-Brutalism principles with drag-and-drop uploads.
๐ Installation
Core Package (Basic Scraping)
pip install morphscrapper
With Optional Media Processing Features
# To install with OCR, Audio, and Video conversion dependencies:
pip install "morphscrapper[all]"
System Dependencies
For full conversion capabilities, make sure the system binaries are installed on your OS:
# Ubuntu/Debian
sudo apt update
sudo apt install -y tesseract-ocr ffmpeg
# macOS
brew install tesseract ffmpeg
๐ป Usage & Quick Start
1. Python API
from morphscrapper import scrape_text, scrape_images, image_to_text
# Scrape document content from a website
result = scrape_text("https://example.com")
if result["success"]:
print(f"Page Title: {result['title']}")
print(result["text"])
# Scrape images
img_result = scrape_images("https://example.com")
print(f"Found {img_result['count']} images.")
# Perform local OCR (requires Tesseract)
ocr_text = image_to_text("receipt.png")
if ocr_text["success"]:
print(ocr_text["text"])
2. Command-Line Interface (CLI)
# Scrape text from a URL and export as CSV
morph scrape text https://example.com --output csv
# Scrape and download images
morph scrape images https://example.com --download
# Extract audio track from an MP4 file
morph convert video-to-audio movie.mp4 --save-as audio.wav
# Start the Web GUI
morph web
๐ Neo-Brutalism Web Dashboard
Run morph web or python -m morph.cli.main web to launch the local web server. The dashboard provides:
- Interactive Scrapers: Instant scraping for text, images, audio, or video.
- On-Demand Package Download: Download your scraping results as TXT, CSV, JSON, or package your images/audio/video files into a ZIP archive instantly.
- Media Converters: Drag-and-drop any local file below the scraper to instantly convert images to text, audio to text, or videos to frames and audio tracks, featuring real-time visual media players and galleries.
๐ Repository Architecture
morphscrapper/
โโโ morph/ # Main package source
โ โโโ cli/ # Command-line entry points
โ โโโ core/ # Settings and static configuration
โ โโโ scrapers/ # Scraper scripts (text, image, audio, video)
โ โโโ converters/ # Media converters (OCR, speech, video)
โ โโโ utils/ # Downloaders, exporters, validators
โ โโโ web/ # Web server backend and static assets
โโโ docs/ # Full manuals (usage, install, API guides)
โโโ examples/ # Code usage demonstrations
โโโ tests/ # Unit testing suite
โโโ pyproject.toml # Package configuration
โโโ setup.py # Package installer script
โโโ README.md # Project README
๐ License
This project is licensed under the MIT License. See the LICENSE file for details.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file morphscrapper-0.1.1.tar.gz.
File metadata
- Download URL: morphscrapper-0.1.1.tar.gz
- Upload date:
- Size: 39.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4c900ffb050e65004da0a185c11a9c0fdfc534daa2c342737f82421af2bf1b8
|
|
| MD5 |
52008d054156b03946d8c6d7cae89c42
|
|
| BLAKE2b-256 |
54ef0a5715af663282f2d0c63ac265e40f427938d05ee1abfc25985a019ce0be
|
File details
Details for the file morphscrapper-0.1.1-py3-none-any.whl.
File metadata
- Download URL: morphscrapper-0.1.1-py3-none-any.whl
- Upload date:
- Size: 46.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e0a44199237303e03d916087bbd209b8443f2be64268312e3c87c458547bda0
|
|
| MD5 |
1bb425be955bc03c26f8733e77da2cc5
|
|
| BLAKE2b-256 |
3fd4805561dc57cd0a8f5d05e0b5744ce11942599ebcc388c1f7d9699b1f4d61
|