Skip to main content

A multi-modal web scraping package for extracting text, images, audio, and video.

Project description

morphscrapper logo

๐Ÿ”ฎ morphscrapper

A sophisticated, multi-modal web scraping and media conversion suite for Python.

Build Status PyPI version Python Versions License


๐Ÿ“– 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 Requests BS4
OCR Engine pytesseract, Pillow (Tesseract OCR wrapper) Tesseract
Speech-to-Text SpeechRecognition, pydub Speech
Video Processing moviepy (FFmpeg-powered) FFmpeg
Web Dashboard Flask, Vanilla HTML5, CSS3, JavaScript Flask Theme

โœจ 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:

  1. Interactive Scrapers: Instant scraping for text, images, audio, or video.
  2. On-Demand Package Download: Download your scraping results as TXT, CSV, JSON, or package your images/audio/video files into a ZIP archive instantly.
  3. 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

morphscrapper-0.1.2.tar.gz (42.1 kB view details)

Uploaded Source

Built Distribution

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

morphscrapper-0.1.2-py3-none-any.whl (50.0 kB view details)

Uploaded Python 3

File details

Details for the file morphscrapper-0.1.2.tar.gz.

File metadata

  • Download URL: morphscrapper-0.1.2.tar.gz
  • Upload date:
  • Size: 42.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for morphscrapper-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fcd12d38cb06656f721f4fb10e2a548d69ff38b885f6468371798621ca27abf8
MD5 d7ec19b3029b6789c911da46c2e9286b
BLAKE2b-256 828b7c6fb9bc87c83daf50190933ed34f0add8a42e84d61cf71405f466b37d89

See more details on using hashes here.

File details

Details for the file morphscrapper-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: morphscrapper-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 50.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for morphscrapper-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a0af8b3b580539a07eead32f30cc3f838579a52eefab139b508dcb08adfadd16
MD5 f74740115f09bf04975c8e4796d7eb4e
BLAKE2b-256 1d6970d4ce3376d7264b543fa76c083b93421ffaf89423eecba90d05d4df0183

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