A powerful Telegram bot that provides detailed information about movies and TV series, complete with recommendations, trailers, and IMDb integration.
- Movie Search: Get comprehensive information about any movie
- Series Search: Detailed TV series information with episode data
- Season Search: Specific season information with episode listings
- Smart Detection: Automatically detects whether you're searching for a movie or series
- Movie/Series posters and details
- IMDb ratings and links
- Cast, director, and writer information
- Genre, release date, and runtime
- Awards and country information
- Language and content rating
- Genre-based recommendations for movies and series
- Personalized suggestions based on your searches
- Cached recommendations for faster responses
- Direct trailer links via YouTube search
- Watch links for movies and series
- Shortened URLs using MDisk API
- IMDb integration for detailed information
- Message filtering with custom keywords
- Automatic message deletion for filtered content
- Group and channel management
- Broadcasting system for announcements
- Statistics tracking
- Cache management
- User interaction monitoring
- API usage tracking with daily limits
- Python 3.7+
- Telegram Bot Token (from @BotFather)
- OMDB API Key (from OMDb API)
- MDisk API Key (for URL shortening)
-
Clone the repository
git clone https://github.com/YatharthSanghavi/Movizinfo.git cd Movizinfo -
Install dependencies
pip install -r requirements.txt
-
Environment Setup
Create a
.envfile in the root directory:BOT_TOKEN=your_telegram_bot_token OMDB_API_KEY=your_omdb_api_key MDISK_API_KEY=your_mdisk_api_key DEVELOPER_ID=your_telegram_user_id GROUP_IDS=[] CHANNEL_IDS=[] ENVIRONMENT=development
-
Run the bot
python movie_filter_bot.py
| Variable | Description | Required |
|---|---|---|
BOT_TOKEN |
Telegram bot token from BotFather | β |
OMDB_API_KEY |
API key for movie/series data | β |
MDISK_API_KEY |
API key for URL shortening | β |
DEVELOPER_ID |
Your Telegram user ID for admin commands | β |
GROUP_IDS |
JSON array of group IDs (auto-managed) | β |
CHANNEL_IDS |
JSON array of channel IDs (auto-managed) | β |
ENVIRONMENT |
Set to 'production' for webhook mode | β |
WEBHOOK_URL |
Base URL for webhook (production only) | β |
PORT |
Port for Flask app (default: 5000) | β |
The bot supports message filtering through filtered_words.json:
["inappropriate_word1", "spam_word2"]/start- Welcome message and bot introduction/help- List of available commands and usage/recommend- Get movie/series recommendations by genre/id- Get your Telegram user ID/info- Display your profile information
- Direct Search: Simply type the movie or series name
- Season Search: Type "series name season number" (e.g., "Breaking Bad season 1")
/devinfo- Bot and system information/stats- Usage statistics/clearcache- Clear the bot's cache/broadcast- Send message to all users and groups/broadcast_status- View tracked channels and groups/filter <word>- Add word to filter list/reload- Reload bot configuration
- Search Engine: Handles movie/series queries using OMDB API
- Recommendation System: Provides intelligent suggestions based on genres
- Caching Layer: Reduces API calls and improves response times
- Message Filter: Moderates content in groups and channels
- Broadcasting System: Manages announcements to users and groups
- OMDB API: Primary source for movie and TV series data
- MDisk API: URL shortening for cleaner links
- Telegram Bot API: Core bot functionality
- YouTube Search: Trailer and watch links
User Query β Search Detection β API Call β Data Processing β Response Formatting β User Response
python movie_filter_bot.py- Set environment variables in your hosting platform
- Configure webhook by setting:
ENVIRONMENT=productionWEBHOOK_URL=https://your-app-url.com/
- Deploy using your platform's deployment method
The project includes vercel.json for easy Vercel deployment:
vercel --prodThe bot automatically detects search intent:
- Movie names β Movie search
- Series names β Series search
- "Series Season X" β Season-specific search
- Genre-based filtering
- Randomized suggestions
- 24-hour caching for performance
- Support for both movies and series
- Custom keyword filtering
- Automatic message deletion
- Temporary notification messages
- Group moderation support
- Mass messaging to all users
- Channel and group announcements
- Status tracking and reporting
- Developer-only admin commands
- User ID verification for sensitive operations
- Rate limiting for API calls
- Secure environment variable handling
- Caching System: Reduces API calls by 80%
- Daily API Limits: Prevents quota exhaustion
- Message Cleanup: Automatic deletion to reduce clutter
- Efficient Data Processing: Optimized response formatting
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Initial release with full movie/series search
- Recommendation system implementation
- Message filtering and moderation
- Broadcasting capabilities
- Admin panel and statistics