Skip to main content

A package for extracting AI-generated images and videos from various platforms

Project description

Momoya

A Python package for extracting AI-generated images and videos from various platforms.

Features

  • Extract AI-generated images and videos with associated metadata
  • Command-line interface for easy usage
  • Multiple search methods: by content ID or by text query

Currently Supported Platforms

  • Sora AI: Extracts images/videos and metadata using gen_id or text query

Installation

# Clone the repository
git clone https://github.com/yourusername/momoya.git
cd momoya

# Install the package
pip install -e .

Usage

Command Line Interface

The package provides a command-line interface for easy usage:

# Set your authentication token (recommended)
export MOMOYA_SORA_AUTH_TOKEN="your_auth_token_here"

# Extract content from Sora using generation ID
python -m momoya.cli sora --gen-id gen_01jt5veqacf4tsvcwa76kb908m

# Search for content using a text query
python -m momoya.cli sora --query "selfie with a dog"

# Save to a specific directory
python -m momoya.cli sora --query "space exploration" --output-dir my_downloads

# Limit the number of results
python -m momoya.cli sora --query "sunset beach" --limit 10

# Skip saving metadata
python -m momoya.cli sora --gen-id gen_01jt5veqacf4tsvcwa76kb908m --no-metadata

Python API

You can also use the package in your Python code:

import asyncio
from momoya.extractors.sora_extractor import SoraExtractor

async def download_sora_content():
    # Initialize the extractor
    extractor = SoraExtractor(
        auth_token="your_auth_token_here",
        download_dir="downloads"
    )
    
    # Example 1: Download content by generation ID
    gen_id = "gen_01jt5veqacf4tsvcwa76kb908m"
    downloaded = await extractor.run(content_id=gen_id, save_metadata=True)
    print(f"Downloaded {downloaded} items using generation ID")
    
    # Example 2: Search and download content by text query
    query = "abstract art in vibrant colors"
    downloaded = await extractor.run(
        query=query, 
        save_metadata=True,
        limit=5,  # Limit to 5 results
    )
    print(f"Downloaded {downloaded} items using text query")

# Run the async function
asyncio.run(download_sora_content())

Adding New Extractors

The package is designed to be easily extensible with new extractors for different AI platforms:

  1. Create a new extractor class in the momoya/extractors directory
  2. Implement the BaseExtractor interface
  3. Add the new extractor to the CLI in momoya/cli.py

Authentication

Most AI platforms require authentication to access their platforms (Bearer token)

License

MIT

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

momoya-1.0.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

momoya-1.0.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file momoya-1.0.0.tar.gz.

File metadata

  • Download URL: momoya-1.0.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for momoya-1.0.0.tar.gz
Algorithm Hash digest
SHA256 58fe05f8bf60aa1e8db8c6a5fbd8ce8a34a9a961a73a2ea6e043e08d84cc2e66
MD5 f0c2b06099a71513d41b29074805890d
BLAKE2b-256 252d1e7103a54fccd89327ea8b5fb3477df1968ef4c66f2bb34b51211a594496

See more details on using hashes here.

File details

Details for the file momoya-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: momoya-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for momoya-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9925fcd2a06ebbd268bbadddda26c216810f4428beb293f887668a67e5099451
MD5 44464d0789da20d34bf2e2761b50e997
BLAKE2b-256 031f149d8eef94a9fcbc1c0b651595eb28ed070a2e43b98bfd2832793c7b9b46

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