TelegramCrawler 2 Updated - Kishan1750/OSINT GitHub Wiki
refer below zip file
Introduction
The Telegram Crawler is a versatile Python-based script that empowers users to interact with the Telegram API and efficiently extract media files from Telegram channels and groups. This crawler serves as a valuable tool for Telegram users, enabling them to access and manage media content from various chats with ease.
Code
Code Explanation
The Telethon Media Downloader is written in Python and makes use of the Telethon library for interacting with the Telegram API. The key components of the script are as follows:
- API Credentials: The script starts by collecting your API ID and API hash, which are necessary for establishing a connection with the Telegram API.
- Client Initialization: The initialize_client() function sets up the Telegram client using the provided API credentials. It also handles the loading of an existing session or creating a new one.
- Media Extraction and Analysis: The script interacts with Telegram chats to extract media files, such as images and documents. It then analyzes these files to gather useful information such as extensions, sizes, and filenames.
- Media Download and Text Generation: Based on user preferences, the script allows you to download specific types of media files and even generate text files from the content of messages.
- User Interaction: The script provides a user-friendly interface for selecting chats, extensions, and actions. It ensures that the user can make choices easily and intuitively.
Usefulness
The Telethon Media Downloader offers a range of practical applications:
- Media Archiving: Easily download and organize media files from your Telegram chats for archival purposes.
- Content Analysis: Extract text from media files to perform content analysis or sentiment analysis on messages.
- Research and Documentation: Download important documents, images, and files shared within your Telegram groups for research or documentation.
- Automation: The script's automation capabilities make it efficient for bulk downloading and processing of media files. You can easily install these libraries via pip:
Screenshots
Screenshot 1: (Session file is already exist) choose your chennal (o-one,m-multiple,a-all)
Screenshot 2: Fetching all the extensions from all choosen chennals, then choose your extension (o-one,m-multiple,a-all)
Screenshot 3: Fetching files with matched extensions from first chennal and then downloading them , in last text files will be generated for the messages.
Screenshot 4: Fetching files with matched extensions from second chennal and then downloading them , in last text files will be generated for the messages.
Installation and Usage
- Clone the repository and navigate to the project directory.
- Run the script using python TelegramCrawler-v2.py.
- Follow the prompts to input your API credentials and choose the desired chats, extensions, and actions.
Features
- Interactive command-line interface for easy interaction and customization.
- Media downloading based on selected extensions for efficient storage.
- Generation of text files for attached message related to that files.
- Support for single and multiple chat selections.
- Extension-specific filtering and download options.