All notable changes to the Dailymotion Transcript Scraper project are documented here.
Metadata extraction failures on Apify platform
yt-dlp return code 1 errors in LIMITED_PERMISSIONS sandbox
Firefox impersonation not available in container
stderr output truncation hiding actual error messages
No retry logic for transient failures
Retry logic with exponential backoff (3 attempts, 2-8s delays)
Enhanced yt-dlp flags :
--socket-timeout 30 - Explicit socket timeout
--user-agent "Mozilla/5.0..." - Static user-agent (avoids impersonation)
Full stderr logging - No truncation, complete error messages
Per-attempt logging - Shows which attempt succeeded/failed
Improved timeout handling - 90s total (up from 60s)
extract_metadata() : Added retry logic (now ~75 lines vs 20)
download_subtitles() : Added Dailymotion extractor args
Logging: Full stderr instead of truncated (300 chars)
Transient failures now retry automatically
Permanent failures fail faster (after 3 attempts instead of hanging)
Better diagnostics - stderr output now shows actual error
BUGFIX_METADATA_EXTRACTION.md - Detailed explanation and testing
✓ Same input/output format
✓ Same function signatures
✓ All existing tests pass
✓ No configuration changes needed
[0.2.0] - 2025-07-23 - Logging Enhancement
Added comprehensive logging system across all components
Enhanced observability for production monitoring and troubleshooting
Extensive documentation for all audiences (users, developers, operators)
LOGGING.md (13 KB) - Main logging guide with examples and patterns
LOGGING_COMPLETE.md (14 KB) - Complete implementation details
PROJECT_STRUCTURE.md (13 KB) - Project organization and file purposes
INDEX_DOCUMENTATION.md (new) - Documentation roadmap
ENHANCEMENT_SUMMARY.md (new) - Summary of changes and metrics
.actor/LOGGING_GUIDE.md (9 KB) - Technical logging patterns reference
.actor/LOGGING_ENHANCEMENTS.md (9.4 KB) - Feature details
.actor/TROUBLESHOOTING_LOGS.md (9.9 KB) - Problem/solution pairs
.actor/LOGGING_SUMMARY.md (11 KB) - Changes summary
CHANGELOG.md (this file) - Change tracking
Enhanced - Code Structure
Main function : Now includes detailed job orchestration logs
Search function : Logs query, execution, JSON parsing, results
Metadata extraction : Logs extraction process and key fields
Subtitle download : Logs file operations and parsing
Language selection : Logs available/preferred languages and selection logic
Error handling : All exceptions now logged with context
Enhanced - User Experience
Clear execution flow with phase separators
Visual markers (✅ ❌ ⚠️ 🛑 ✓) for quick scanning
Component-level filtering for focused log analysis
Four log levels for flexibility (DEBUG/INFO/WARNING/ERROR)
Extensible logging configuration for future enhancements
✓ No breaking changes to API or configuration
✓ No changes to input/output format
✓ No changes to core functionality
✓ No performance degradation (<1% overhead)
Visibility : Every phase of execution now has detailed logging
Traceability : Can track individual videos through processing pipeline
Debuggability : Easy to identify where failures occur
Monitorability : Statistics visible in logs for production monitoring
Extensibility : Configuration ready for metrics collection, APM integration
[0.1.0] - 2025-07-23 - Initial Apify Actor Release
Complete Apify actor for Dailymotion transcript scraping
Support for direct URLs and search queries
Multi-language subtitle/caption support
Rich metadata extraction via yt-dlp
Dataset and KV store output
Input support :
Direct Dailymotion video URLs
Search queries with time filters
Language preference configuration
Customizable output file naming
Processing capabilities :
Metadata extraction (30+ fields)
Manual subtitle download
Auto-caption download
Multi-language transcript selection
SRT/VTT parsing
Output format :
Per-video dataset items
Aggregated JSON in KV store
Summary statistics
Language coverage reporting
Async/await for Apify compatibility
Cross-platform path handling
UTF-8 encoding support
Error recovery and continuation
Temporary file cleanup
README.md - Main documentation
Dockerfile - Container definition
requirements.txt - Dependencies
Input/output/dataset schemas
Reads input configuration
Validates parameters
Logs configuration summary
Initializes temporary directories
Typical logs:
[ MAIN ] Configuration :
[ MAIN ] - Direct URLs : 1
[ MAIN ] - Search query : ( none )
[ MAIN ] - Preferred languages : [ 'en' , 'it' ]
Processes direct URLs
Executes search if query provided
Deduplicates results
Reports total URLs to process
Typical logs:
[ SEARCH ] Starting search for query : 'python'
[ SEARCH ] Found 10 video URL ( s )
[ MAIN ] Total unique URLs to process : 11
3. Per-Video Processing Loop
For each video:
3a. Metadata Extraction
Runs yt-dlp with JSON output
Extracts title, duration, views, availability
Logs available subtitles and captions
Typical logs:
[ METADATA ] Starting metadata extraction
[ METADATA ] Extracted : title = 'Python Tutorial' , views = 50000
[ METADATA ] Subtitles available : [ 'en' , 'fr' , 'it' ]
3b. Subtitle Download
Downloads manual subtitles
Downloads auto-captions
Tracks file count and types
Typical logs:
[ SUBTITLES ] Found 2 SRT files and 1 VTT file
[ SUBTITLES ] ✓ en : 245 lines ( SRT )
[ SUBTITLES ] ✓ it : 238 lines ( VTT )
3c. Parsing & Language Selection
Parses SRT/VTT files
Removes timestamps and metadata
Selects primary language based on preference
Calculates word count
Typical logs:
[ PARSE_SRT ] extracted 187 lines ( skipped 63 )
[ LANG_SELECT ] ✓ Selected : en ( priority 1 ) , 2847 words
3d. Result Recording
Pushes item to dataset
Tracks success/failure
Logs title and available languages
Typical logs:
Calculates statistics
Counts successes/failures
Reports language coverage
Saves aggregated output to KV store
Typical logs:
[ MAIN ] Summary statistics :
[ MAIN ] - Succeeded : 9
[ MAIN ] - Failed : 1
[ MAIN ] - Success rate : 90 %
[ MAIN ] - Languages found : { 'en' : 9 , 'it' : 8 , 'fr' : 5 }
Confirms KV store save
Logs final status
Reports time and statistics
Typical logs:
[ MAIN ] ✅ Summary saved successfully
[ MAIN ] ✅ JOB COMPLETE
Error Handling & Recovery
Single Video Failure:
Logged with specific reason
Job continues to next video
Counted in failure statistics
Included in final summary
Example:
[ METADATA ] yt - dlp failed with return code 1
[ METADATA ] stderr : Video unavailable
[ MAIN ] ❌ [ 2 / 10 ] FAILED : Video processing returned None
No URLs Found:
Logged as critical
Job aborts with warning
No processing attempted
Example:
[ SEARCH ] Found 0 video URL ( s )
[ MAIN ] 🛑 No URLs to process . Aborting .
Language Fallback:
Preferred languages not found
Uses first available language
Logged as warning, not error
All languages still included in output
Example:
[ LANG_SELECT ] Available languages : [ 'fr' , 'de' ]
[ LANG_SELECT ] Preferred languages : [ 'en' , 'it' ]
[ LANG_SELECT ] ⚠ No preferred language matched . Using first available : fr
Search Phase:
Fast: <5 seconds (typical)
Normal: 5-10 seconds
Slow: >10 seconds (check network)
Metadata Extraction:
Fast: <5 seconds
Normal: 5-10 seconds
Slow: >10 seconds (may timeout at 60s)
Subtitle Download:
No subtitles: <1 second
Small subtitles: 5-10 seconds
Large subtitles: 10-30 seconds (may timeout at 120s)
Per-Video Total:
Typical: 10-30 seconds
With many subtitles: 30-60 seconds
Slow network: >60 seconds
Typical successful run:
[ MAIN ] Summary statistics :
[ MAIN ] - Total processed : 5
[ MAIN ] - Succeeded : 5
[ MAIN ] - Failed : 0
[ MAIN ] - Success rate : 100 %
[ MAIN ] - Languages found : { 'en' : 5 , 'it' : 4 , 'fr' : 3 }
Acceptable run (some failures):
[ MAIN ] - Succeeded : 8
[ MAIN ] - Failed : 2
[ MAIN ] - Success rate : 80 %
Issues to investigate:
[ MAIN ] - Succeeded : 2
[ MAIN ] - Failed : 8
[ MAIN ] - Success rate : 20 %
→ Check : Network , URLs validity , yt - dlp version
Monitoring Recommendations
In Production:
Monitor SUCCESS count ≥ 90%
Watch for timeout patterns
Track language coverage
Alert on ERROR in logs
Monitor job completion status
Key Statistics to Track:
Success rate percentage
Language coverage
Videos with no subtitles (expected)
Failed video reasons
Processing time trends
Alert Thresholds:
0 successful videos: CRITICAL
Success rate <50%: WARNING
Success rate <20%: CRITICAL
All videos timeout: CRITICAL
Version Date Type Focus 0.2.0 2025-07-23 Enhancement Comprehensive Logging 0.1.0 2025-07-23 Initial Release Core Scraper
apify>=1.0.0 - Apify SDK
yt-dlp>=2024.1.0 - Video extraction
No dependency changes in 0.2.0 release.
None. Version 0.2.0 is fully backward compatible with 0.1.0.
✓ Same input format
✓ Same output format
✓ Same API
✓ Same functionality
✓ Same configuration
Potential future enhancements (0.3.0+):
Metrics collection and export
APM (Application Performance Monitoring) integration
JSON structured logging for centralized monitoring
Performance profiling per component
Cost tracking per video
Failure rate alerting
Language coverage analytics
Subtitle quality metrics
See LOGGING.md for logging guide
See TROUBLESHOOTING_LOGS.md for problem solving
See PROJECT_STRUCTURE.md for architecture
Check TROUBLESHOOTING_LOGS.md for your error pattern
Consult LOGGING.md for detailed analysis
Enable debug mode: ACTOR_LOG_LEVEL=debug
Capture full logs for analysis
Generated: 2025-07-23
Last Updated: 2025-07-23