|
| 1 | +=<p align="center"> |
| 2 | + <a href="https://t.me/EyeTubeAiBot"> |
| 3 | + <img src="https://github.com/Mickekofi/EyeTubeBot/blob/master/logo.jpg" alt="Logo" width="130"> |
| 4 | + </a> |
| 5 | + <a href = "https://t.me/EyeTubeAiBot"> |
| 6 | + <h1 align="center"><strong>EyeTubeBot Version(1.0.1)</strong></h1> |
| 7 | + </a> |
| 8 | + <p align="center"> |
| 9 | + <a href="https://t.me/possibilityAI"> |
| 10 | + <img src="https://img.shields.io/badge/Join-Community-blue.svg" alt="AGPL License"> |
| 11 | + </a> |
| 12 | + <a href="https://wa.me/233505994829?text=*EyeTubeB👁t_From_Github_User_💬Message_:*%20"> |
| 13 | + <img src="https://img.shields.io/badge/Contact-Engineers-red.svg" alt="Build Status"> |
| 14 | + </a> |
| 15 | + </p> |
| 16 | +</p> |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +**Welcome to EyeTubeBot**: a tool for downloading videos, movies, and extracting audio from multiple platforms. This is the **Core(beta)** version (1.0.1), designed for developers who want to automate the process of video and audio downloads from platforms such as YouTube, Instagram, Facebook, Twitter, LinkedIn, Snapchat, and Audiomack. |
| 21 | + |
| 22 | +## Highlights |
| 23 | + |
| 24 | +- [Highlights](#highlights) |
| 25 | +- [Features](#features) |
| 26 | +- [Requirements](#requirements) |
| 27 | +- [Installation](#installation) |
| 28 | +- [Configuration](#configuration) |
| 29 | +- [Usage](#usage) |
| 30 | +- [Commands](#commands) |
| 31 | +- [Update Handling](#update-handling) |
| 32 | +- [The Structure \& Flow](#the-structure--flow) |
| 33 | + |
| 34 | + |
| 35 | +## Features |
| 36 | + |
| 37 | +- Download videos from YouTube, Instagram, Facebook, Twitter, LinkedIn, Snapchat. |
| 38 | +- Extract audio from supported platforms (YouTube, Instagram, Twitter, Facebook, LinkedIn, Snapchat, Audiomack). |
| 39 | +- Automate the update process of your bot. |
| 40 | +- Basic error handling and retry mechanism. |
| 41 | + |
| 42 | +## Requirements |
| 43 | + |
| 44 | +- Python 3.7+ |
| 45 | +- Libraries: |
| 46 | + - `telebot` (pyTelegramBotAPI) |
| 47 | + - `re` |
| 48 | + - `time` |
| 49 | + - `logging` |
| 50 | + - `subprocess` |
| 51 | + - `update_checker` |
| 52 | +- An active **Telegram Bot API Token** from [BotFather](https://t.me/BotFather). |
| 53 | + |
| 54 | +## Installation |
| 55 | + |
| 56 | +1. Clone the repository: |
| 57 | + |
| 58 | +```bash |
| 59 | + |
| 60 | + git clone https://github.com/Mickekofi/EyeTubeBot.git |
| 61 | + cd EyeTubeBot |
| 62 | + ``` |
| 63 | + |
| 64 | +2. Install the required libraries: |
| 65 | + ```bash |
| 66 | + pip install -r requirements.txt |
| 67 | + ``` |
| 68 | + |
| 69 | +3. Ensure the necessary imports are in place: |
| 70 | + ```python |
| 71 | + import logging |
| 72 | + import time |
| 73 | + import re |
| 74 | + import telebot |
| 75 | + from update_checker import UpdateChecker |
| 76 | + ``` |
| 77 | + |
| 78 | +## Configuration |
| 79 | + |
| 80 | +1. Set up your bot with your Telegram API token: |
| 81 | + |
| 82 | + ```python |
| 83 | + TOKEN = input("Please enter your Telegram API token: ") |
| 84 | + bot = telebot.TeleBot(TOKEN) |
| 85 | + ``` |
| 86 | + |
| 87 | +Get your **Telegram Bot API Token** from [BotFather](https://t.me/BotFather) Free. |
| 88 | + |
| 89 | +2. **Admin Setup**: Enter your name when prompted to personalize the bot's welcome messages. |
| 90 | +
|
| 91 | +3. **Error Handling**: This bot retries operations on failures automatically by utilizing the `retry_on_failure` decorator. |
| 92 | +
|
| 93 | +## Usage |
| 94 | +
|
| 95 | +1. **Starting the Bot**: Run the bot by executing the script: |
| 96 | + ```bash |
| 97 | + python EyeTube_main.py |
| 98 | + ``` |
| 99 | +
|
| 100 | +2. **Platform Support**: |
| 101 | + - Supported platforms for video/audio extraction: |
| 102 | + - YouTube |
| 103 | + - Instagram |
| 104 | + - Twitter |
| 105 | + - Facebook |
| 106 | + - LinkedIn |
| 107 | + - Snapchat |
| 108 | + - Audiomack |
| 109 | +
|
| 110 | +3. **Audio/Video Download**: |
| 111 | + - To download **audio**, append `-a` to the URL. |
| 112 | + - To download **video**, simply paste the URL. The bot will automatically handle the request. |
| 113 | + - For YouTube, you can specify the video quality using `-h` for high quality or `-l` for low quality (defaults to high). |
| 114 | +
|
| 115 | +## Commands |
| 116 | +
|
| 117 | +- `/start`: Starts the bot and presents a basic user interface for interacting with the bot. |
| 118 | +- `/help`: Provides a link to the bot's documentation. |
| 119 | +- `/about`: Displays information about the EyeTubeBot. |
| 120 | +- `/check_update`: Checks for available bot updates. |
| 121 | +- `/update`: Automatically pulls updates from the GitHub repository. |
| 122 | + |
| 123 | +## Update Handling |
| 124 | + |
| 125 | +EyeTubeBot includes built-in update handling. To check for updates: |
| 126 | +1. Use the `/check_update` command to see if a newer version is available. |
| 127 | +2. Use the `/update` command to update the bot via a GitHub pull request. |
| 128 | + |
| 129 | +The bot also includes a button that directs users to the [Update Documentation](https://github.com/Mickekofi/EyeTubeBot/blob/master/update.md) to see what’s new in each release. |
| 130 | + |
| 131 | + |
| 132 | +## The Structure & Flow |
| 133 | + |
| 134 | +After a Successful Inicialization of a Verified Telegram API, We Implement an Error Handler funtion which prevents the bot from crushing down and exiting due to an error and specifically a **Network Connection Failure** |
| 135 | + |
| 136 | +``` |
| 137 | +# Retry Error Handling |
| 138 | +def retry_on_failure(func): |
| 139 | + def wrapper(*args, **kwargs): |
| 140 | + while True: |
| 141 | + try: |
| 142 | + return func(*args, **kwargs) |
| 143 | + except Exception as e: |
| 144 | + print(f"Error: {e}. Retrying in 5 seconds...") |
| 145 | + time.sleep(20) |
| 146 | + return wrapper |
| 147 | +``` |
| 148 | +
|
0 commit comments