{"id":13617691,"url":"https://github.com/Mahesh0253/Media-Search-bot","last_synced_at":"2025-04-14T06:34:53.636Z","repository":{"id":37793679,"uuid":"295122764","full_name":"Mahesh0253/Media-Search-bot","owner":"Mahesh0253","description":"Inline bot for channels and groups","archived":false,"fork":false,"pushed_at":"2024-02-09T16:55:01.000Z","size":101,"stargazers_count":560,"open_issues_count":14,"forks_count":1154,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-11-08T02:34:22.953Z","etag":null,"topics":["bot","inline-search","telegram"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mahesh0253.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-09-13T09:56:33.000Z","updated_at":"2024-11-07T09:11:20.000Z","dependencies_parsed_at":"2024-08-01T20:56:44.836Z","dependency_job_id":null,"html_url":"https://github.com/Mahesh0253/Media-Search-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mahesh0253%2FMedia-Search-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mahesh0253%2FMedia-Search-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mahesh0253%2FMedia-Search-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mahesh0253%2FMedia-Search-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mahesh0253","download_url":"https://codeload.github.com/Mahesh0253/Media-Search-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248835829,"owners_count":21169304,"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":["bot","inline-search","telegram"],"created_at":"2024-08-01T20:01:46.321Z","updated_at":"2025-04-14T06:34:53.368Z","avatar_url":"https://github.com/Mahesh0253.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# [Media Search bot](https://github.com/Mahesh0253/Media-Search-bot)\n\n* Index channel or group files for inline search.\n* When you post file on telegram channel or group this bot will save that file in database, so you can search easily in inline mode.\n* Supports document, video and audio file formats with caption support.\n\n## Installation\n\n### Watch this video to create bot - https://youtu.be/dsuTn4qV2GA\n### Easy Way\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\n\n### Hard Way\n```bash\n# Create virtual environment\npython3 -m venv env\n\n# Activate virtual environment\nenv\\Scripts\\activate.bat # For Windows\nsource env/bin/activate # For Linux or MacOS\n\n# Install Packages\npip3 install -r requirements.txt\n\n# Edit info.py with variables as given below then run bot\npython3 bot.py\n```\nCheck [`sample_info.py`](sample_info.py) before editing [`info.py`](info.py) file\n\n### Docker\n```\ndocker run -d \\\n    -e BOT_TOKEN=\"123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11\" \\\n    -e API_ID='12345' \\\n    -e API_HASH='0123456789abcdef0123456789abcdef' \\\n    -e CHANNELS='-10012345678' \\\n    -e ADMINS='123456789' \\\n    -e DATABASE_URI=\"mongodb+srv://...mongodb.net/Database?retryWrites=true\u0026w=majority\" \\\n    -e DATABASE_NAME=databasename \\\n    --restart on-failure \\\n    --name mediasearchbot botxtg/media-search-bot\n```\nYou can also run with `env` file like below,\n```\ndocker run -d \\ \n     --env-file .env \\\n     --restart on-failure \\\n     --name mediasearchbot botxtg/media-search-bot\n```\n\n## Variables\n### Required Variables\n* `BOT_TOKEN`: Create a bot using [@BotFather](https://telegram.dog/BotFather), and get the Telegram API token.\n* `API_ID`: Get this value from [telegram.org](https://my.telegram.org/apps)\n* `API_HASH`: Get this value from [telegram.org](https://my.telegram.org/apps)\n* `CHANNELS`: Username or ID of channel or group. Separate multiple IDs by space\n* `ADMINS`: Username or ID of Admin. Separate multiple Admins by space\n* `DATABASE_URI`: [mongoDB](https://www.mongodb.com) URI. Get this value from [mongoDB](https://www.mongodb.com). For more help watch this [video](https://youtu.be/dsuTn4qV2GA)\n* `DATABASE_NAME`: Name of the database in [mongoDB](https://www.mongodb.com). For more help watch this [video](https://youtu.be/dsuTn4qV2GA)\n\n### Optional Variables\n* `COLLECTION_NAME`: Name of the collections. Defaults to Telegram_files. If you going to use same database, then use different collection name for each bot\n* `CACHE_TIME`: The maximum amount of time in seconds that the result of the inline query may be cached on the server\n* `USE_CAPTION_FILTER`: Whether bot should use captions to improve search results. (True/False)\n* `AUTH_USERS`: Username or ID of users to give access of inline search. Separate multiple users by space. Leave it empty if you don't want to restrict bot usage.\n* `AUTH_CHANNEL`: Username or ID of channel. Without subscribing this channel users cannot use bot.\n* `START_MSG`: Welcome message for start command.\n* `INVITE_MSG`: Auth channel invitation message.\n* `USERBOT_STRING_SESSION`: User bot string session.\n## Admin commands\n```\nchannel - Get basic infomation about channels\ntotal - Show total of saved files\ndelete - Delete file from database\nindex - Index all files from channel or group\nlogger - Get log file\n```\n\n## Tips\n* Use `index` command or run [one_time_indexer.py](one_time_indexer.py) file to save old files in the database that are not indexed yet.\n* You can use `|` to separate query and file type while searching for specific type of file. For example: `Avengers | video`\n* If you don't want to create a channel or group, use your chat ID / username as the channel ID. When you send a file to a bot, it will be saved in the database.\n\n## Contributions\nContributions are welcome.\n\n## Thanks to [Pyrogram](https://github.com/pyrogram/pyrogram)\n\n## Support\n[Update Channel](https://t.me/botxupdates) and [Support Group](https://t.me/botxsupport)\n\n## License\nCode released under [The GNU General Public License](LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMahesh0253%2FMedia-Search-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMahesh0253%2FMedia-Search-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMahesh0253%2FMedia-Search-bot/lists"}