Metadata-Version: 2.2
Name: scraperly
Version: 2.0.1
Summary: A tool for processing content into AI-generated videos
Home-page: https://github.com/adelelawady/scraperly
Author: adelelawady
Author-email: adel50ali5@gmail.com
Keywords: ai,video,content,processing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0
Requires-Dist: urllib3>=2.0.0
Requires-Dist: selenium>=4.15.2
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: numpy>=1.24.3
Requires-Dist: Pillow<11.0,>=9.5.0
Requires-Dist: decorator>=4.4.2
Requires-Dist: imageio>=2.31.1
Requires-Dist: imageio-ffmpeg>=0.4.8
Requires-Dist: proglog>=0.1.10
Requires-Dist: tqdm>=4.65.0
Requires-Dist: moviepy>=2.0.0.dev2
Requires-Dist: gTTS>=2.3.1
Requires-Dist: pydub>=0.25.1
Provides-Extra: ai
Requires-Dist: openai>=1.0.0; extra == "ai"
Requires-Dist: anthropic>=0.3.0; extra == "ai"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Scraperly 🎬 

<p align="center">
  <img src="https://github.com/user-attachments/assets/d2acb889-33a8-4eed-9c24-18b4693e5cfc" alt="Logo" width="200">
</p>

<p align="center">
  <a href="https://pypi.org/project/scraperly/">
    <img src="https://img.shields.io/pypi/v/scraperly.svg" alt="PyPI version">
  </a>
  <a href="https://pypi.org/project/scraperly/">
    <img src="https://img.shields.io/pypi/pyversions/scraperly.svg" alt="Python versions">
  </a>
  <a href="https://github.com/adelelawady/scraperly/blob/main/LICENSE">
    <img src="https://img.shields.io/github/license/adelelawady/scraperly.svg" alt="License">
  </a>
  <a href="https://github.com/adelelawady/scraperly/stargazers">
    <img src="https://img.shields.io/github/stars/adelelawady/scraperly.svg" alt="GitHub stars">
  </a>
  <a href="https://github.com/adelelawady/scraperly/issues">
    <img src="https://img.shields.io/github/issues/adelelawady/scraperly.svg" alt="GitHub issues">
  </a>
  <a href="https://pepy.tech/project/scraperly">
    <img src="https://static.pepy.tech/badge/scraperly" alt="Downloads">
  </a>
</p>

> Transform your text into captivating AI-narrated videos with matching visuals! 🚀

Scraperly is your all-in-one Python toolkit for creating engaging AI-powered videos. It seamlessly combines web scraping, AI content processing, and video generation to turn your text into professional-looking videos with minimal effort.

## 📚 Table of Contents
- [✨ Features](#-features)
- [🚀 Quick Start](#-quick-start)
- [⚙️ Installation](#️-installation)
- [🎯 Use Cases](#-use-cases)
- [🛠️ Advanced Usage](#️-advanced-usage)
- [🤖 AI Providers](#-ai-providers)
- [🔧 Troubleshooting](#-troubleshooting)
- [👥 Contributing](#-contributing)
- [📝 License](#-license)

## ✨ Features

- 🎥 **One-Click Video Creation**: Transform text into professional videos
- 🤖 **Multiple AI Providers**: Choose from OpenAI, Anthropic, Hyperbolic, or Ollama
- 🖼️ **Smart Image Scraping**: Automatic image sourcing from Lexica.art
- 🗣️ **Natural Narration**: High-quality text-to-speech conversion
- ⚡ **Fast Processing**: Efficient content segmentation and processing
- 🎨 **Customizable Output**: Control image count and video parameters

## 🚀 Quick Start

```python
from scraperly import scraperly
import os

# Create your first AI video in just 3 lines!
result = scraperly(
    content="Your story or content here",
    provider_name="openai",
    api_key=os.getenv("OPENAI_API_KEY"),
    model="gpt-4"
)
```

## ⚙️ Installation

### 📦 Using pip (Recommended)
```bash
# Basic installation
pip install scraperly

# With AI provider support
pip install "scraperly[ai]"

# Set up your API keys (recommended)
export OPENAI_API_KEY="your-openai-api-key"
export ANTHROPIC_API_KEY="your-anthropic-api-key"
```

### 🔧 From Source
```bash
# Clone and install
git clone https://github.com/adelelawady/scraperly.git
cd scraperly
pip install -e ".[ai]"
```

## 🎯 Use Cases

### 1. Story Visualization
```python
from scraperly import scraperly
import os

# Turn a story into an engaging video
story = """
The ancient castle stood silently against the twilight sky,
its weathered stones holding centuries of secrets...
"""

result = scraperly(
    content=story,
    provider_name="anthropic",
    api_key=os.getenv("ANTHROPIC_API_KEY"),
    model="claude-3-sonnet",
    max_images_per_segment=3
)
```

### 2. Educational Content
```python
from scraperly import scraperly
import os

# Create educational videos
lesson = """
The Solar System consists of eight planets orbiting around the Sun.
Each planet has unique characteristics...
"""

result = scraperly(
    content=lesson,
    provider_name="openai",
    api_key=os.getenv("OPENAI_API_KEY"),
    model="gpt-4-turbo",
    max_images_per_segment=2,
    output_video_path="solar_system.mp4"
)
```

## 🤖 AI Providers

| Provider | Default Model | Available Models | Features |
|----------|--------------|------------------|-----------|
| OpenAI | `gpt-4` | All OpenAI chat models (e.g., `gpt-4`, `gpt-3.5-turbo`, `gpt-4-turbo`, etc.) | Best for creative content |
| Anthropic | `claude-3-sonnet` | All Claude models (e.g., `claude-3-opus`, `claude-3-sonnet`, `claude-3-haiku`, etc.) | Excellent analysis |
| Hyperbolic | `deepseek-v3` | All Deepseek models (e.g., `deepseek-v3`, `deepseek-v2`, etc.) | Fast processing |
| Ollama | `llama2` | All Ollama models (e.g., `llama2`, `mistral`, `codellama`, etc.) | Local execution |

## 🔧 Troubleshooting

<details>
<summary>🚫 Chrome Driver Issues</summary>

- ✅ Update Chrome to latest version
- ✅ Verify matching chromedriver version
- ✅ Check system PATH configuration
</details>

<details>
<summary>❌ AI Provider Errors</summary>

- ✅ Verify API key validity
- ✅ Check provider status
- ✅ Confirm model availability
</details>

<details>
<summary>⚠️ Video Processing Issues</summary>

- ✅ Install/update FFmpeg
- ✅ Check disk space
- ✅ Verify file permissions
</details>

## 🤝 Contributing

We love your input! To contribute:

1. 🍴 Fork the repo
2. 🌿 Create your branch (`git checkout -b feature/AmazingFeature`)
3. 💾 Commit changes (`git commit -m 'Add AmazingFeature'`)
4. 📤 Push to branch (`git push origin feature/AmazingFeature`)
5. 🎁 Open a Pull Request

## 📝 License

Released under MIT License. See [LICENSE](LICENSE) for details.

## 👤 Author

Created with 💖 by [adelelawady](mailto:adel50ali5@gmail.com)

---

<p align="center">
  Made with ❤️ for the AI community
</p>


