{"id":18015354,"url":"https://github.com/hirbodbehnam/redditdownloaderbot","last_synced_at":"2025-04-06T00:08:31.060Z","repository":{"id":46238346,"uuid":"250956366","full_name":"HirbodBehnam/RedditDownloaderBot","owner":"HirbodBehnam","description":"A reddit downloader telegram bot","archived":false,"fork":false,"pushed_at":"2025-03-22T09:52:28.000Z","size":294,"stargazers_count":91,"open_issues_count":1,"forks_count":23,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T23:08:37.954Z","etag":null,"topics":["reddit","reddit-downloader","reddit-downloader-bot","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Go","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/HirbodBehnam.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":"2020-03-29T04:53:32.000Z","updated_at":"2025-03-22T09:52:26.000Z","dependencies_parsed_at":"2024-06-18T22:50:37.549Z","dependency_job_id":"69fa7965-98b7-4e61-a4db-302c81465d07","html_url":"https://github.com/HirbodBehnam/RedditDownloaderBot","commit_stats":{"total_commits":103,"total_committers":3,"mean_commits":"34.333333333333336","dds":0.07766990291262132,"last_synced_commit":"8879e6c7e7af06bbceadf2ed0c4cccdd681ead29"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HirbodBehnam%2FRedditDownloaderBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HirbodBehnam%2FRedditDownloaderBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HirbodBehnam%2FRedditDownloaderBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HirbodBehnam%2FRedditDownloaderBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HirbodBehnam","download_url":"https://codeload.github.com/HirbodBehnam/RedditDownloaderBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415967,"owners_count":20935387,"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","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":["reddit","reddit-downloader","reddit-downloader-bot","telegram-bot"],"created_at":"2024-10-30T04:13:45.968Z","updated_at":"2025-04-06T00:08:31.039Z","avatar_url":"https://github.com/HirbodBehnam.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reddit Downloader Bot\n\nA Telegram bot for downloading Reddit posts.\n\nTable of Contents\n=================\n\n* [What this bot can do](#what-this-bot-can-do)\n* [What this bot cannot do](#what-this-bot-cannot-do)\n    * [List of non x.redd.it hosts from which this bot\n      *can* download](#list-of-non-xreddit-hosts-from-which-this-bot-can-download)\n* [Setup](#setup)\n    * [Build](#build)\n    * [Obtain Reddit Token](#obtain-reddit-token)\n    * [Obtain Telegram Token](#obtain-telegram-token)\n    * [Run](#run)\n* [Optional Settings](#optional-settings)\n    * [Allowed Users](#allowed-users)\n    * [Disable NSFW Content](#disable-nsfw-content)\n\n# What this bot can do\n\n* Send Reddit posts and comments as text on Telegram\n* Send images and image galleries hosted on `i.redd.it`\n* Send videos hosted on `v.redd.it`\n* Convert videos to audio only\n* Send GIFs hosted on Reddit\n* Let users choose the quality of images and videos\n* Limit the users who can use it\n\n# What this bot cannot do\n\n* Send polls\n* Send deleted posts\n* Upload files larger than 50 MB\n* Send text posts with over 4,096 characters or complex markdown (for example, tables)\n* Download images or videos that are not hosted on `x.redd.it` (for example, YouTube videos)\n\n## List of non `x.redd.it` hosts from which this bot *can* download\n\n1. Imgur\n2. Gfycat\n3. Streamable\n\n# Setup\n\n## Build\n\nFirst, install [FFmpeg](https://www.ffmpeg.org). On Debian or Ubuntu, simply run `apt install ffmpeg`. Then, clone and\nbuild the project using the following steps.\n\n```bash\ngit clone https://github.com/HirbodBehnam/RedditDownloaderBot\ncd RedditDownloaderBot\ngo build ./cmd/RedditDownloaderBot/\n```\n\n## Obtain Reddit Token\n\nTo use the bot, you will need Reddit and Telegram tokens. Start by creating a Reddit application. Go\nto https://www.reddit.com/prefs/apps and click on “are you a developer? create an app...” Choose a name, select `script`\nas the type of application, input something in the redirect URI field, and click on “create app.”\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/63400670/215763728-f4242f17-46bd-421b-ab1c-493d1ec49f3b.png\" alt=\"Creating a Reddit application\"/\u003e\n\u003c/p\u003e\n\nYou will be given two tokens: a client ID and a client secret—as shown in the image below.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/63400670/215763740-7e4e771e-1c40-47a8-95fb-3227dd130a82.png\" alt=\"Reddit tokens\"/\u003e\n\u003c/p\u003e\n\n## Obtain Telegram Token\n\nInteract with [BotFather](https://t.me/BotFather) to create a bot and obtain its token. Additionally, you can use\nthis [guide](https://core.telegram.org/bots/tutorial#obtain-your-bot-token).\n\nYour token will look something like this:\n\n```bash\n4839574812:AAFD39kkdpWt3ywyRZergyOLMaJhac60qc\n```\n\n## Run\n\nNow that you have the necessary tokens, edit the docker-compose.yml file and set the environment variables as such:\n\n```bash\nexport CLIENT_ID=p-jcoLKBynTLew\nexport CLIENT_SECRET=gko_LXELoV07ZBNUXrvWZfzE3aI\nexport BOT_TOKEN=1234567:4TT8bAc8GHUspu3ERYn-KGcvsvGB9u_n4ddy\n```\n\nYou can run the bot using docker-compose. In case you don’t have docker-compose installed, follow the steps below.\n\n```bash\nsudo curl -L \"https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64\" -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\n```\n\nLastly, run `docker-compose up --build` inside the RedditDownloaderBot directory to build and run the bot.\n\n# Optional Settings\n\n## Allowed Users\n\nYou can configure the bot to allow access to only a group of users. This is useful for deploying private bots. To do so,\nyou need to create a whitelist that consists of Telegram user IDs. You can obtain user IDs\nusing [GetIDs Bot](https://t.me/getidsbot). Next, create the environment variable `ALLOWED_USERS` and set its value to\nuser IDs, separated by a comma.\n\n```bash\nexport ALLOWED_USERS=1,2,3\n```\n\n## Disable NSFW Content\n\nYou can keep the bot from downloading NSFW posts by setting the following environment variable:\n\n```bash\nexport DENY_NSFW=true\n```\n\n## Disable Post Link\n\nThe post link is included in the caption by default. You can disable it by setting the following environment variable:\n\n```bash\nexport DISABLE_LINK_IN_CAPTION=true\n```\n\n## Imgur Proxy\n\nThe proxy to download the Imgur media through it. Imgur sometimes blocks some IP addresses like Hetzner for example.\nIt's interesting because even with authorization it does not work. Even accessing through the browser it does not work\neither. So, someone might use a proxy (like Cloudflare Warp) to bypass this restriction.\n\n```bash\nexport IMGUR_PROXY=http://127.0.0.1:10809\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirbodbehnam%2Fredditdownloaderbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirbodbehnam%2Fredditdownloaderbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirbodbehnam%2Fredditdownloaderbot/lists"}