A Go application that fetches posts from public Telegram channels and exports them as structured JSON files with automatic GitHub Actions integration.
- 🚀 No API Required - Uses Telegram's public RSS feed
- 📝 Complete Post Data - Message content, dates, views, media, hashtags, mentions
- 🖼️ Media Extraction - Photos, videos, and uploaded files with URLs
- 🎨 Markdown Preserved - HTML formatting, links, and emoji support
- 🕐 Real Timestamps - Accurate dates with Unix timestamps
- 🔄 Auto-Export - GitHub Actions runs every 30 minutes
- 🌿 Clean Repository - Separate export branch, main stays clean
- 🛡️ Rate Limit Protection - Random delays and user agents
- Clone or download this project
- Install Go (if not already installed)
- Run the application:
go run .Or build it:
go build -o telefeed
./telefeedtelefeed/
├── config.json # Channel configuration
├── export/ # Local export folder (gitignored)
├── .github/workflows/ # GitHub Actions
├── main.go # Main application
├── fetcher_colly.go # Telegram data fetcher
├── exporter.go # JSON export functionality
└── .gitignore # Git ignore rules
- main: Source code and configuration only
- export: Contains JSON export files (auto-updated)
The export/ folder is gitignored to keep the main branch clean. Export files are automatically pushed to the export branch via GitHub Actions.
Edit config.json to specify which channels to export:
{
"channels": [
"ircfspace",
"vahidonline",
"your_channel_name"
]
}Note: Use only the username part without the @ symbol.
Each channel is exported to export/{channel_name}.json with comprehensive data:
{
"info": {
"id": 0,
"title": "Channel Title",
"username": "channelname",
"photo_url": "https://cdn.telesco.pe/file/..."
},
"posts": [
{
"id": 12345,
"message": "Post content with <a href=\"links\">HTML formatting</a>",
"date": "2026-05-03T09:30:00Z",
"edited": false,
"views": 1500,
"forwards": 25,
"replies": 10,
"sender_name": "Sender Name",
"media": [
{
"type": "photo",
"url": "https://cdn.telesco.pe/file/...",
"width": 800,
"height": 600
},
{
"type": "video",
"url": "https://cdn.telesco.pe/file/..."
}
],
"hashtags": ["#example", "#telegram"],
"mentions": ["@user"],
"links": ["https://example.com"]
}
],
"last_updated": 1777791234
}The project includes automated GitHub Actions that:
- Run every 30 minutes - Automatic channel updates
- Separate branches - Clean main branch, exports in
exportbranch - Rate limiting - Random delays and user agents
- Error handling - Continues even if some channels fail
- Detailed logging - Summary reports with file statistics
- main: Source code and configuration only
- export: JSON export files (auto-updated)
go run .# Build and run
docker-compose up telefeed
# Auto-run every 30 minutes
docker-compose --profile scheduled up telefeed-scheduledEdit config.json to specify channels:
{
"channels": [
"ircfspace",
"vahidonline",
"your_channel"
]
}- Push code to GitHub
- Enable Actions in repository settings
- Automatic exports every 30 minutes
# Build binary
go build -o telefeed
# Run with cron
*/30 * * * * cd /path/to/telefeed && ./telefeed- Go 1.21 or higher
- Internet connection
- Public Telegram channels only
- Public channels only - No private channel support
- Recent posts - Limited by Telegram's public feed
- Rate limits - Built-in protection but may need adjustments
- HTML dependency - May break if Telegram changes web structure