downloaderbot

module
v0.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: MIT

README

Downloader bot

This bot downloads media files from Instagram and YouTube and uploads them to the telegram bot

Environment variables

Environment variables are available here

Required environment variables
DOWNLOADERBOT_TELEGRAM_BOT_API_TOKEN= # your telegram bot api token

Known limitations

  • TikTok is not available in inline mode. TikTok CDN URLs only serve the video when the request carries the browser's cookies + a tiktok.com referer, so the bot has to download the bytes itself (which it does in direct messages). Telegram inline results, however, can only reference a publicly fetchable URL or an already-uploaded file_id — raw bytes cannot be attached. Making TikTok work inline therefore requires either pre-uploading the video to obtain a file_id (needs a storage chat) or proxying it through a public URL; this is planned but not implemented yet. TikTok works normally when the link is sent to the bot in a direct message.
  • The gRPC API returns media URLs, not bytes. For TikTok the returned URL needs the same cookies/referer headers to download, which the API does not currently expose, so API clients cannot fetch TikTok videos directly yet.

Directories

Path Synopsis
cmd
app command
internal
api
media
Package media provides a single entry point for obtaining media content.
Package media provides a single entry point for obtaining media content.
pkg
browser
Package browser provides a small wrapper around a shared, reusable headless Chromium instance (via go-rod).
Package browser provides a small wrapper around a shared, reusable headless Chromium instance (via go-rod).
instagram
This code is borrowed from this repository with small changes https://github.com/omegaatt36/instagramrobot
This code is borrowed from this repository with small changes https://github.com/omegaatt36/instagramrobot
tiktok
Package tiktok extracts downloadable media from TikTok video links by loading the page in a real (headless) browser, which bypasses TikTok's anti-bot.
Package tiktok extracts downloadable media from TikTok video links by loading the page in a real (headless) browser, which bypasses TikTok's anti-bot.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL