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.1.tar.gz (39.0 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.1-py3-none-any.whl (46.3 kB view details)

Uploaded Python 3

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

Hashes for morphscrapper-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f4c900ffb050e65004da0a185c11a9c0fdfc534daa2c342737f82421af2bf1b8
MD5 52008d054156b03946d8c6d7cae89c42
BLAKE2b-256 54ef0a5715af663282f2d0c63ac265e40f427938d05ee1abfc25985a019ce0be

See more details on using hashes here.

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

Hashes for morphscrapper-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3e0a44199237303e03d916087bbd209b8443f2be64268312e3c87c458547bda0
MD5 1bb425be955bc03c26f8733e77da2cc5
BLAKE2b-256 3fd4805561dc57cd0a8f5d05e0b5744ce11942599ebcc388c1f7d9699b1f4d61

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