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.
- β¨ Features
- π Quick Start
- π― Input/Output Examples
- βοΈ Installation
- π― Use Cases
- π οΈ Advanced Usage
- π€ AI Providers
- π§ Troubleshooting
- π₯ Contributing
- π License
- π₯ 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
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"
)
The wind howled through the abandoned streets as Elias tightened his coat around his shoulders. The city had once been alive, filled with laughter and the hum of everyday life, but now only the echoes of the past remained. He stepped over the broken pavement, eyes scanning for any sign of movement. The sun was setting, casting long shadows against the crumbling buildings. He needed to find shelter before nightfall. There was always something lurking in the darkness.
His footsteps echoed as he approached an old bookstore, its windows shattered, pages of forgotten stories scattered across the floor. He pushed the door open carefully, the hinges groaning in protest. Dust hung thick in the air, disturbed only by his breath. Shelves stood like silent sentinels, their contents long since plundered. He made his way toward the back, past fallen books and overturned chairs, and found what he was looking for. A hidden door, half-concealed behind a collapsed shelf.
With effort, he pushed through, stepping into a smaller room, untouched by the chaos outside. A single lantern sat on a desk, its wick dry but intact. He rummaged through his pack, pulling out a match, and struck it against the rough surface of his sleeve. The flame flickered to life, casting dancing shadows along the walls. He exhaled slowly, the brief warmth comforting.
He lowered himself into an old chair, feeling the exhaustion settle into his bones. He had been walking for days, searching for something he wasnβt sure existed anymore. A place safe from the nightmares that roamed the world, from the hunger that gnawed at his ribs, from the memories that refused to fade.
Outside, the wind picked up again, rattling the broken glass and whispering secrets through the ruins. He closed his eyes, listening, waiting, knowing that soon, he would have to move again.
example.mp4
# 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"
# Clone and install
git clone https://github.com/adelelawady/scraperly.git
cd scraperly
pip install -e ".[ai]"
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
)
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"
)
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 |
π« Chrome Driver Issues
- β Update Chrome to latest version
- β Verify matching chromedriver version
- β Check system PATH configuration
β AI Provider Errors
- β Verify API key validity
- β Check provider status
- β Confirm model availability
β οΈ Video Processing Issues
- β Install/update FFmpeg
- β Check disk space
- β Verify file permissions
We love your input! To contribute:
- π΄ Fork the repo
- πΏ Create your branch (
git checkout -b feature/AmazingFeature
) - πΎ Commit changes (
git commit -m 'Add AmazingFeature'
) - π€ Push to branch (
git push origin feature/AmazingFeature
) - π Open a Pull Request
Released under MIT License. See LICENSE for details.
Created with π by adelelawady
Made with β€οΈ for the AI community