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

# Install the package
pip install momoya

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
momoya sora --gen-id gen_01jt5veqacf4tsvcwa76kb908m

# Search for content using a text query
momoya sora --query "selfie with a dog"

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

# Limit the number of results
momoya sora --query "sunset beach" --limit 10

# Skip saving metadata
momoya 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.1.0.tar.gz (13.1 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.1.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for momoya-1.1.0.tar.gz
Algorithm Hash digest
SHA256 15af3bdaaa0124571a8b4ef5c51b972010a43b6b44e7dfa1b059fdf869d24e75
MD5 109eec7157622a65b92e10fad0e44e38
BLAKE2b-256 2b0c06a97018a0d71b74309f11f5c1d110845b1c3e7998910da117642e604baf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: momoya-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98092198b918fc8eb368ae0d45f39694d35b888788e08a88a12218792b212812
MD5 853aad6037a82a4569963e46d251fc7c
BLAKE2b-256 b6d7e2c810e22087e99d96b764b5faefa79a1466afab9b3d2f10b4fd6d03dfec

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