{"id":26436394,"url":"https://github.com/secfurry/telegramdedup","last_synced_at":"2025-08-03T16:40:15.848Z","repository":{"id":221056004,"uuid":"753321353","full_name":"secfurry/TelegramDedup","owner":"secfurry","description":"Remove duplicate media from your Telegram channels.","archived":false,"fork":false,"pushed_at":"2024-04-09T01:50:44.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-09T02:44:42.365Z","etag":null,"topics":["python","telegram","telegram-api","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/secfurry.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}},"created_at":"2024-02-05T22:17:37.000Z","updated_at":"2024-02-05T22:56:26.000Z","dependencies_parsed_at":"2024-02-05T23:49:26.793Z","dependency_job_id":"dc0a5bd2-afe1-484c-b313-20756d7dbcda","html_url":"https://github.com/secfurry/TelegramDedup","commit_stats":null,"previous_names":["secfurry/telegramdedup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secfurry%2FTelegramDedup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secfurry%2FTelegramDedup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secfurry%2FTelegramDedup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secfurry%2FTelegramDedup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secfurry","download_url":"https://codeload.github.com/secfurry/TelegramDedup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244181367,"owners_count":20411605,"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":["python","telegram","telegram-api","telethon"],"created_at":"2025-03-18T08:16:49.442Z","updated_at":"2025-03-18T08:16:49.855Z","avatar_url":"https://github.com/secfurry.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram Media De-Duplicator\n\nRemove duplicate media from your Telegram channels.\n\n## Setup / Install\n\nSetup and install is pretty simple. This only requires the `telethon` python package.\nYou can install it via `pip install telethon` or use the requirements file with\n`pip install -r requirements.txt`.\n\n## Prerequistes\n\n- Telegram API app_id/app_hash\n\nThis can be registered by logging into [https://my.telegram.org](https://my.telegram.org)\nand generating a new application.\n\nNOTE: _Bots CANNOT be used with this script, they lack the required permssions_\n\n## Running\n\nUsage just requires the above app_id/app_hash and the target channel name.\nOther arguments can be specified to augment output or if deletion is done.\nSee the _Usage_ section for the full helptext.\n\nIf you do not have media deletion permissions, the script will fail when trying\nto delete duplicated media.\n\nAn example to remove duplicate media from the channel \"My Image Channel\"\n\n```shell\npython dedup.py -i 123456789 -n myhashcode \"My Image Channel\"\n```\n\nThis example will only preform a dry run (no deletion) on the channel \"My Image Channel\"\nand outputs the duplicated media files into the \"dupes\" directory path.\n\n```shell\npython dedup.py -i 123456789 -n myhashcode -d -o \"dupes\" \"My Image Channel\"\n```\n\n## Usage\n\n```text\nUsage: dedup.py [-f|--state file] [-d|--dry] [-o|--output dir] [--no-state] -i \u003capp_id\u003e -n \u003capp_hash\u003e \u003cchannel_name\u003e\n\nPositional Arguments:\n    channel_name            Name of the Channel to use. You MUST have the ability\n                            to delete media for deletion to work!\n\nRequired Arguments:\n    -i           \u003capp_id\u003e   Telegram API app_id value.\n    --app-id\n    -n           \u003capp_hash\u003e Telegram API app_hash value.\n    --app-hash\n\nOptional Arguments:\n    -f           \u003cfile\u003e     Name of the saved session state file. Used to prevent\n    --state                 needing to supply credentials every time used.\n    -o           \u003cdir\u003e      Path of a directory to output the duplicated media files\n    --output                to. If this directory does not exist, it will be created.\n    -d                      Preform a dry run and do not delete any duplicate media.\n    --dry                   This will still output files is the \"-o/--output\" argument\n                            is used.\n    --no-state              Prevent using a state file. By default if no \"-f/--state\"\n                            argument is provided, the value \"deduper\" will be used.\n                            pass this flag to prevent this default state file from\n                            being used. Overrides any \"-f/--state\" argument.\n\nThe app_id and app_hash values can be gerenerated via the Telegram API page at\nhttps://my.telegram.org.\n\nOn first run or when no state file is used, you will be asked for Telegram login\ncredentials. You may use the credentials of any account that has delete permission\nfor media in the target Telegram channel.\n\nNOTE: YOU CANNOT USE BOT TOKENS FOR THIS!! Bots do NOT have the ability to list\nchannels.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecfurry%2Ftelegramdedup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecfurry%2Ftelegramdedup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecfurry%2Ftelegramdedup/lists"}