Description
The bot currently supports video downloads from multiple platforms but lacks image downloading capabilities. Users should be able to download images from social media posts, with support for multi-image posts sent as Telegram albums.
Current State
- Video downloading works via
VideoDownloader class in modules/video_downloader.py
- Supported platforms defined in
VideoPlatforms.SUPPORTED_PLATFORMS
- URL processing handles domain modifications
Proposed Features
-
Image Download Support:
- Instagram posts and stories
- Facebook posts
- Twitter/X image posts
- TikTok image posts (carousel posts)
-
Album Functionality:
- Detect multi-image posts
- Send as Telegram media group/album
- Preserve image order and quality
-
Integration Points:
- Extend existing
VideoDownloader class or create ImageDownloader
- Reuse URL extraction logic from
extract_urls
- Leverage existing error handling and cleanup mechanisms
Technical Implementation
- Add image detection logic to platform identification
- Implement image extraction using yt-dlp or platform-specific APIs
- Create album grouping logic for multi-image posts
- Add image format optimization (JPEG/PNG handling)
- Extend file size limits and cleanup for images
Benefits
- Complete media downloading solution
- Better user experience for image-heavy social media
- Consistent interface with existing video downloads
The implementation would build on the existing video download infrastructure, particularly the platform detection system and the message handling pipeline.
Notes
The bot already has URL processing capabilities for Meta platforms (Instagram/Facebook) and Twitter domain modifications, which could be leveraged for the image downloading feature.
Wiki pages you might want to explore:
Description
The bot currently supports video downloads from multiple platforms but lacks image downloading capabilities. Users should be able to download images from social media posts, with support for multi-image posts sent as Telegram albums.
Current State
VideoDownloaderclass inmodules/video_downloader.pyVideoPlatforms.SUPPORTED_PLATFORMSProposed Features
Image Download Support:
Album Functionality:
Integration Points:
VideoDownloaderclass or createImageDownloaderextract_urlsTechnical Implementation
Benefits
The implementation would build on the existing video download infrastructure, particularly the platform detection system and the message handling pipeline.
Notes
The bot already has URL processing capabilities for Meta platforms (Instagram/Facebook) and Twitter domain modifications, which could be leveraged for the image downloading feature.
Wiki pages you might want to explore: