Flexible multimodal scraper for social media 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 playwrightand runningplaywright install.
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
- ❌ 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
Release history Release notifications | RSS feed
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 scrapemm-0.6.2.tar.gz.
File metadata
- Download URL: scrapemm-0.6.2.tar.gz
- Upload date:
- Size: 56.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a40a9c72e7c2dc273b300c7926a664d7c30b3cc6e3e004752a13ba746bc5473
|
|
| MD5 |
08a682017b51f2733e955d2b92d3815c
|
|
| BLAKE2b-256 |
b078cd601d27c396ba18b7e59a88a99d1d0a1d44444ba790cd6a120c7a877ffc
|
File details
Details for the file scrapemm-0.6.2-py3-none-any.whl.
File metadata
- Download URL: scrapemm-0.6.2-py3-none-any.whl
- Upload date:
- Size: 67.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23853cfa61558d03262843dd89158f232af68ebda9a5498436c3f4d79ab59a37
|
|
| MD5 |
55dfd89f6e93aaaae42e944c12ae4db4
|
|
| BLAKE2b-256 |
6e595be04989a7051ee3fdcc7d9703debb70920b648b4b806d7bd353866f505a
|