{"id":25823002,"url":"https://github.com/fd2013/telegram-channels-export","last_synced_at":"2025-09-14T03:23:29.605Z","repository":{"id":278838972,"uuid":"936938472","full_name":"fd2013/telegram-channels-export","owner":"fd2013","description":"This script allows you to export all the channels you are a member of, public and private channels.","archived":false,"fork":false,"pushed_at":"2025-02-22T01:16:34.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T02:21:42.721Z","etag":null,"topics":["export-csvfile","private-channels","public-channel","python","python-script","telegram-api","telegram-channel","telethon"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fd2013.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-22T00:54:48.000Z","updated_at":"2025-02-22T01:18:17.000Z","dependencies_parsed_at":"2025-02-22T02:32:00.396Z","dependency_job_id":null,"html_url":"https://github.com/fd2013/telegram-channels-export","commit_stats":null,"previous_names":["fd2013/telegram-channels-export-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fd2013/telegram-channels-export","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fd2013%2Ftelegram-channels-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fd2013%2Ftelegram-channels-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fd2013%2Ftelegram-channels-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fd2013%2Ftelegram-channels-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fd2013","download_url":"https://codeload.github.com/fd2013/telegram-channels-export/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fd2013%2Ftelegram-channels-export/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275056290,"owners_count":25397820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["export-csvfile","private-channels","public-channel","python","python-script","telegram-api","telegram-channel","telethon"],"created_at":"2025-02-28T11:37:06.769Z","updated_at":"2025-09-14T03:23:29.576Z","avatar_url":"https://github.com/fd2013.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram Channels Export Script\n\nThis python script allows you to export all the Telegram channels you are a member of, including both public and private channels. The output will contain the channel name, ID, username (if available), and a direct link to the channel.\n\n## Features\n- ✅ Exports **all** channels (public \u0026 private)\n- ✅ Saves **channel name, ID, username, and link**\n- ✅ Outputs data in a **CSV file** for easy use\n- ✅ Improved error handling and logging\n- ✅ Reusable without needing to log in again\n\n## Prerequisites\n1. **Get Telegram API Credentials**\n   - Go to [my.telegram.org](https://my.telegram.org/)\n   - Log in and navigate to **API Development Tools**\n   - Create a new application and copy your `api_id` and `api_hash`\n\n2. **Install Dependencies**\n   - Install `Telethon`, a Telegram API library for Python:\n     ```bash\n     pip install telethon\n     ```\n\n## Usage\n1. **Clone this repository**:\n   ```bash\n   git clone https://github.com/fd2013/telegram-channels-export.git\n   cd telegram-channels-export\n   ```\n\n2. **Edit the script to add your API credentials**:\n   - Open `telegram_channel_export.py` in a text editor.\n   - Replace the placeholders with your **API ID** and **API Hash**:\n     ```python\n     API_ID = YOUR_API_ID  # Example: 123456\n     API_HASH = \"YOUR_API_HASH\"  # Example: \"abcdef1234567890abcdef1234567890\"\n     ```\n\n3. **Run the script**:\n   ```bash\n   python telegram_channel_export.py\n   ```\n\n4. **Login**\n   - The first time you run the script, you'll need to enter your **Telegram phone number**.\n   - A **verification code** will be sent to Telegram—enter it in the terminal.\n\n5. **Check the exported file**:\n   - After running, a file called `telegram_channels.csv` will be created in `C:\\Users\\YourUsername`, containing:\n     ```csv\n     Channel Name,Channel ID,Username,Channel Link\n     Crypto News,123456789,cryptonews,https://t.me/cryptonews\n     Private Group A,987654321,Private,Private\n     Tech Updates,567890123,techupdates,https://t.me/techupdates\n     ```\n\n## Notes\n- **Public channels** will have a clickable link in the format `https://t.me/username`.\n- **Private channels** do not have usernames and will be labeled as `\"Private\"` in the link column.\n- The script creates a session file (`telegram_channel_export.session`), so you **don’t need to log in every time**.\n- If you have **Two-Step Verification (2FA) enabled**, the script will prompt you for your password.\n- If you want to log in with a new account, delete the `.session` file and rerun the script.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contribution\nFeel free to contribute! Open an issue or submit a pull request.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffd2013%2Ftelegram-channels-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffd2013%2Ftelegram-channels-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffd2013%2Ftelegram-channels-export/lists"}