Automated image submission workflow for Dreamstime with advanced AI-powered features.
- Automatic login to Dreamstime
- Navigate to upload section
- Process uploaded images
- Title sanitization (remove colons, limit to 115 chars)
- Auto-submit images
- Template-based description enhancement - Two template sets with 40 descriptive phrases each
- AI image auto-categorization - Automatically categorize AI-generated images
- Model release management - Add model releases automatically
- Exclusive content marking - Mark images as exclusive
- Batch processing - Process up to 10,000 images per run
- Pause intervals - Pause every 20 images for 2 minutes by default
- Duplicate detection - Skip or stop on duplicate image IDs
- Configurable delays - Fast (5-10s) or Slow (10-15s) modes
- Stop functionality - Gracefully stop automation anytime
- Real-time progress tracking - See exactly what's happening
- Gemini AI Analysis - Auto-generate descriptive titles and descriptions
- Health monitoring - Automatic browser recovery on failure
- Python 3.8+
- Playwright
- Flask
- python-dotenv
- Google Gemini API key (optional, for AI features)
-
Clone the repository
git clone <repository-url> cd Dreamstime-AutoUploader
-
Install dependencies
pip install -r requirements.txt
-
Install Playwright browsers
playwright install chromium
-
Configure credentials
Create
.envfile with your settings:DREAMSTIME_USERNAME=your_username DREAMSTIME_PASSWORD=your_password FLASK_SECRET_KEY=your-secret-key-here FLASK_DEBUG=True GEMINI_API_KEY=your-gemini-api-key
python app.pyThen open your browser to: http://localhost:5000
The web interface provides comprehensive options:
1. Description Enhancement
- Template: Choose from professional or creative phrase sets
- Manual Description: Add custom text to all descriptions
2. Image Properties
- AI Generated: Auto-categorize as AI (category 172, subcategory 212)
- Model Release: Add first available model release
- Exclusive: Mark as exclusive content
3. Processing Configuration
- Speed: Fast (5-10s delays) or Slow (10-15s delays)
- Number of Images: How many to process (default 10,000)
- Pause Settings: Pause every 20 images for 2 minutes by default
- Duplicate Action: Skip or stop on duplicate image IDs
Template: None
Number of Images: 10
Speed: Fast
Duplicate Action: Skip
Template: Template 1 (Professional)
AI Generated: Yes
Number of Images: 100
Speed: Fast
Pause After: 20 images
Pause Duration: 120 seconds
Template: Template 2 (Creative)
Manual Description: "High quality commercial content"
Model Release: Yes
Exclusive: Yes
Number of Images: 500
Pause After: 20
Duplicate Action: Stop
The bot exposes RESTful API endpoints for integration with n8n, webhooks, or other automation tools:
POST /api/start - Start automation with optional parameters
POST /api/stop - Stop running automation
GET /api/status - Get current automation status
GET /health - Health check for the bot service
curl -X POST https://n8n.shravanpandala.me/dreamstime/api/start \
-H "Content-Type: application/json" \
-d '{"repeatCount": 100}'The bot includes automatic health monitoring:
- Systemd timer checks browser connection every 2 minutes
- Auto-restarts browser if remote debugging port is unavailable
- Maintains persistent browser session to prevent captcha challenges
- VNC interface available at: https://vnc.shravanpandala.me
-
automation.py: Core automation logic with PlaywrightAutomationState: State management classDreamstimeBot: Main automation orchestrator- Gemini AI integration for image analysis
-
app.py: Flask web server- REST API endpoints for control
- Real-time status updates
- Options handling and validation
-
config.py: Configuration management- Credentials and API key loading
- Default option values
- URL configurations
-
utils.py: Utility functions- Template management (80+ phrases)
- Delay calculation with randomization
- Title sanitization
- Stop-safe wait operations
-
gemini_analyzer.py: AI analysis module- Google Gemini API integration
- Image-to-text analysis
- Title and description generation
-
templates/index.html: Web interface- Comprehensive options panel
- Real-time progress display
- Start/Stop controls
-
static/style.css: Modern, professional styling- Dark mode design
- Smooth animations
chromium-dreamstime.service: Systemd service for persistent browserdreamstime-bot.service: Systemd service for Flask appchromium-healthcheck.service: Health monitoring and recoverychromium-healthcheck.timer: Runs health checks every 2 minutes
Real-time updates show:
- Current step and action
- Success/error status
- Progress percentage
- Processed vs. successful count
- Timestamps for all actions
- Modern dark theme with gradient design
- Real-time status with color-coded indicators
- Scrollable progress log with icons
- Responsive design for all screen sizes
- Smooth animations and transitions
Check console logs for detailed execution information:
# View bot service logs
sudo journalctl -u dreamstime-bot -f
# View browser service logs
sudo journalctl -u chromium-dreamstime -f
# Check health check status
sudo systemctl status chromium-healthcheck.timer
# Verify browser connection
curl http://localhost:9222/json/version- Persistent Browser Session: The browser maintains a persistent session to avoid repeated captcha challenges
- Health Monitoring: Automatic health checks (every 2 minutes) restart the browser if needed
- Initial Login: First login may require manual captcha solving via VNC viewer
- Credentials Security: Never commit your
.envfile to version control - Rate Limiting: Default delays (5-15 seconds) help avoid triggering anti-bot measures
- Duplicate Detection: The bot tracks image IDs to prevent reprocessing
- Max Images Per Run: Default 10,000 images per API call (customizable via payload)
- AI Analysis: Gemini API is optional; titles fall back to descriptions if unavailable
- Added Gemini AI image analysis for descriptive titles/descriptions
- Improved fallback title logic to use descriptions when AI unavailable
- Increased default batch size to 10,000 images per run
- Added health check system with automatic browser recovery
- Fixed browser session persistence to prevent captcha loops
- Reduced delay ranges (5-10s fast, 10-15s slow) for faster processing
- Professional README with reduced emoji usage
- Added template system with 80 descriptive phrases
- AI image auto-categorization
- Model release management
- Exclusive content marking
- Configurable batch processing
- Pause interval support
- Duplicate image detection
- Configurable processing speeds
- Stop functionality
- Enhanced progress tracking
- Basic automation workflow
- Login and navigation
- Image processing
- Basic progress tracking
For issues or questions:
- Check browser status via VNC: https://vnc.shravanpandala.me
- Review bot logs:
sudo journalctl -u dreamstime-bot -f - Check browser service:
sudo systemctl status chromium-dreamstime - Verify health check:
systemctl status chromium-healthcheck.timer - Test connection:
curl http://localhost:9222/json/version - Ensure
.envfile is properly configured
- Built with Playwright for reliable browser automation
- Flask for the web interface
- Google Gemini AI for image analysis
- Systemd for service management and health monitoring