Skip to main content

Multimodal scraper for social media, internet archives, and the open web.

Project description

scrapeMM: Multimodal Web Retrieval

Simple web scraper to asynchronously retrieve webpages and access social media contents, fetching text along with media, i.e., images and videos.

This library aims to help developers and researchers to easily access multimodal data from the web and use it for LLM processing.

Setup

  • If you want to download videos: Then, the installation of ffmpeg is highly recommended. In Conda, you can install it with conda install -c conda-forge ffmpeg.
  • If you want to scrape Perma.cc archive records or Facebook photos, you'll need to install playwright with pip install playwright and running playwright install.

Configure

To set the API secrets, run

from scrapemm import configure_secrets
configure_secrets()

To set the Firecrawl URL, run

from scrapemm import update_config
update_config(firecrawl_url="your_url")

Usage

from scrapemm import retrieve
import asyncio

if __name__ == "__main__":
    url = "https://www.snopes.com/fact-check/gauze-originate-from-gaza/"
    result = asyncio.run(retrieve(url))
    if result.errors:
        print(result.errors)
    else:
        print(result.content)

scrapeMM will ask you for the API secrets needed for the integrations. You may skip them if you don't need them.

You will also be prompted to choose a password that is used to secure the secrets in an encrypted file.

How it works

Input:                                  Output:
URL (string)   -->   retrieve()   -->   MultimodalSequence

The MultimodalSequence is a sequence of Markdown-formatted text and media provided by the ezMM library.

Web scraping is done with Firecrawl and Decodo.

Supported Platforms

Social Media

  • ✅ X/Twitter
  • ✅ Telegram
  • ✅ Bluesky
  • ✅ TikTok
  • ✅ YouTube
  • (✅️) Instagram: works for most content
  • ✅️ Facebook
  • ❌ Threads: TBD
  • ❌ Reddit: TBD

Archiving Services

  • ✅ Perma.cc
  • (✅) Archive.today: Sometimes ending up in TimeoutErrors, generally pretty slow
  • ✅ MediaVault (mvau.lt)
  • ❌ Wayback Machine, Internet Archive (web.archive.org)
  • ❌ AwesomeScreenshot.com
  • ❌ Ghost Archive (ghostarchive.org)

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

scrapemm-0.6.6.tar.gz (58.6 kB view details)

Uploaded Source

Built Distribution

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

scrapemm-0.6.6-py3-none-any.whl (70.3 kB view details)

Uploaded Python 3

File details

Details for the file scrapemm-0.6.6.tar.gz.

File metadata

  • Download URL: scrapemm-0.6.6.tar.gz
  • Upload date:
  • Size: 58.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for scrapemm-0.6.6.tar.gz
Algorithm Hash digest
SHA256 7ebd50eecafdb3b529d4931e58a6e3db300f57c1046506593243d73ccfb99a93
MD5 f90cf921a3d0ea85360d4af00698485b
BLAKE2b-256 71a1f5491ef7dfbf10f56afbc4a652c081a82412bb6bd5a995c0155f5653489d

See more details on using hashes here.

File details

Details for the file scrapemm-0.6.6-py3-none-any.whl.

File metadata

  • Download URL: scrapemm-0.6.6-py3-none-any.whl
  • Upload date:
  • Size: 70.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for scrapemm-0.6.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a7b042886fe2b8a99d120a4c66088201cfa55b201c8090a19e911fa825678d9e
MD5 ea61c16a621684049531f0261e159b9d
BLAKE2b-256 062b193b3edfd0b265244f083ee64dc800cf94d27ae3cdda7f65d3d5ba7e4e0d

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