Telegram inline bot for searching mobile device specifications. The bot uses GSMArena/Helpix parsing, local SQLite caching, fuzzy search and per-user settings.
This repository is intended as a self-hosted open-source release. The original public Telegram instance @gsmarbot is being sunset because it is too expensive and inconvenient to maintain as a constantly running public service.
If you only need device data, use the maintained hosted API:
The API is maintained and works independently from the main Telegram bot. It already contains parsed device data, so in most cases you do not need to run your own bot, parser, or local database.
The API server code is not included in this open-source repository. The public bot code also does not include the API dashboard, API key creation, or the /api Telegram command.
- Telegram inline search powered by Telethon.
- Fuzzy local search over cached device records.
- GSMArena and Helpix parsers.
- SQLite storage for cache, settings, and device submissions.
- Per-user bot settings.
- Python 3.11+
- Telegram bot token from BotFather
- Telegram API ID/hash from https://my.telegram.org
- SQLite, included with Python
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .envFill .env with your Telegram credentials and optional runtime settings. The application reads configuration from environment variables:
set -a
source .env
set +apython bot.pyImportant environment variables:
TELEGRAM_BOT_TOKEN,TELEGRAM_TEST_BOT_TOKENTELEGRAM_API_ID,TELEGRAM_API_HASHfor telethonGSMARBOT_DB_PATH, defaults togsmarbot.dbGSMARBOT_SOURCE_URL, defaults tohttps://github.com/appsfolder/gsmarbotPROXY_URLSas an optional comma-separated proxy list
Runtime files are intentionally ignored by git: SQLite databases, Telethon sessions, logs, API key JSON files, proxy lists, local caches, and private API service code.
bot.py- Telegram bot entry point.bot_state.py- compatibility helpers around SQLite state.modules/config.py- environment-driven runtime configuration.modules/db.py- SQLite schema and data access.modules/parserengine.py- web search and device page parsing.modules/fuzzengine.py- local fuzzy search.modules/articlesbuilder.py,modules/keyboardbuilder.py,modules/reformer.py- Telegram inline UI formatting.modules/utils.py- small shared helpers.site/- static pages and hosted API documentation.misc/- localization and supporting data.
MIT