Telegram-Story-Scraper - A Python Script That Allows You To Automatically Scrape And Download Stories From Your Telegram Friends
This Python script uses Telethon to download Telegram stories from friends. It only accesses stories from friends who allow story viewing, due to Telegram API limitations. The script downloads photos and videos, saving metadata in an SQLite database and exporting to Excel. It runs continuously, checking for new stories at customizable intervals (defaulting to 60 seconds). Prerequisites include Python 3.7+, Telethon, openpyxl, schedule, and Telegram API credentials. Users need to obtain their API ID and hash from Telegram's API development tools. The script connects to Telegram, checks for new stories, downloads media, and stores data. It handles errors, retries failed downloads, and preserves state across runs. Media files are saved with unique filenames, and the script is licensed under the MIT License. The script is for educational purposes, and users must respect Telegram's terms of service and user privacy. Contributions are welcome.