All Projects → thedemons → opentele

thedemons / opentele

Licence: MIT license
A Python Telegram API Library for converting between tdata and telethon sessions, with built-in official Telegram APIs.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to opentele

tdlight-java
Complete Bot and Userbot Telegram library based on TDLib
Stars: ✭ 128 (+42.22%)
Mutual labels:  telegram-api, telegrambot, telegram-userbot
tdlight-telegram-bot-api
The TDLight Telegram Bot API is an actively enhanced fork of the original Bot API, featuring experimental user support, proxies, unlimited files size, and more.
Stars: ✭ 71 (-21.11%)
Mutual labels:  telegram-api, telegrambot
Telegram-mailer
Web-application for sending messages to list of users. Use several accounts to avoid ban.
Stars: ✭ 28 (-68.89%)
Mutual labels:  telegram-api, telethon
addmember-telegram
Add member auto to telegram group
Stars: ✭ 170 (+88.89%)
Mutual labels:  telegram-api, telethon
tgcf
The ultimate tool to automate custom telegram message forwarding. Live-syncer, Auto-poster, backup-bot, cloner, chat-forwarder, duplicator, ... Call it whatever you like! tgcf can fulfill your custom needs.
Stars: ✭ 378 (+320%)
Mutual labels:  telegram-userbot, telethon
TelegramStorageParser
Library to decrypt and parse Telegram Desktop's storage
Stars: ✭ 38 (-57.78%)
Mutual labels:  telegram-desktop, tdesktop
Spotify-Telegram-Bio-Updater
Spotify Telegram Bio Updater Heroku Integration
Stars: ✭ 26 (-71.11%)
Mutual labels:  telegram-userbot, telethon
UniBorg
Pluggable Telegram bot and userbot based on Telethon
Stars: ✭ 196 (+117.78%)
Mutual labels:  telegram-userbot, telethon
WTelegramClient
Telegram client API library written 100% in C# and .NET Standard
Stars: ✭ 192 (+113.33%)
Mutual labels:  telegram-api, telegram-userbot
Telethon
Pure Python 3 MTProto API Telegram client library, for bots too!
Stars: ✭ 5,805 (+6350%)
Mutual labels:  telegram-api, telethon
DevelopersUserbot
Telegram Userbot Made for Developers by Developers
Stars: ✭ 25 (-72.22%)
Mutual labels:  telegram-userbot, telethon
spotify telegram bio updater
This userbot updates the biography of a telegram user according to their current spotify playback.
Stars: ✭ 21 (-76.67%)
Mutual labels:  telegram-userbot, telethon
telecharm-userbot
A powerful, cool and well-made userbot for your Telegram profile, with promising extension capabilities.
Stars: ✭ 17 (-81.11%)
Mutual labels:  telegram-api, telegram-userbot
telegram client
library for help you make userbot or bot telegram and support tdlib telegram database and only support nodejs dart and google-apps-script
Stars: ✭ 38 (-57.78%)
Mutual labels:  telegram-api, telegram-userbot
tgmount
Mount Telegram dialogs and channels as a Virtual File System.
Stars: ✭ 52 (-42.22%)
Mutual labels:  telegram-api, telethon
pmChatBot
A simple feed-back bot written in PHP. Like Livegram. Heroku Support
Stars: ✭ 31 (-65.56%)
Mutual labels:  telegram-api, telegrambot
pyrubrum
An intuitive framework for creating Telegram bots.
Stars: ✭ 33 (-63.33%)
Mutual labels:  telegram-api
TGCopyBot
A python script to copy telegram messages to another chat (without forwarding)
Stars: ✭ 67 (-25.56%)
Mutual labels:  telegram-api
FileRenameBot
A Telegram File Renamer Bot With Permanent Thumbnail Support Also It Can Convert Files Into Video!!
Stars: ✭ 369 (+310%)
Mutual labels:  telegrambot
ZeldrisRobot
An anime themed group management bot, running on python with telethon and ptb.
Stars: ✭ 41 (-54.44%)
Mutual labels:  telethon

opentele

logo

pypi version pypi status documentation workflow tests issues github last commit github commits pypi installs pypi license code format


A Python Telegram API Library for converting between tdata and telethon sessions, with built-in official Telegram APIs. Read the documentation.

NOTICE

Unfortunately, due to the lack of interest, I can no longer maintain this project and keep it up-to-date with the latest version of Telegram Desktop and Telethon.
If you have been using opentele for a while, I appreciate it, please consider contributing to the project, ask any questions in Discussion and I'll try to help.

Features

Dependencies

  • telethon - Widely used Telegram's API library for Python.
  • tgcrypto - AES-256-IGE encryption to works with tdata.
  • pyQt5 - Used by Telegram Desktop to streams data from files.

Installation

  • Install from PyPI:
pip install --upgrade opentele

First Run

Load TDesktop from tdata folder and convert it to telethon, with a custom API:

from opentele.td import TDesktop
from opentele.tl import TelegramClient
from opentele.api import API, CreateNewSession, UseCurrentSession
import asyncio

async def main():
    
    # Load TDesktop client from tdata folder
    tdataFolder = r"C:\Users\<username>\AppData\Roaming\Telegram Desktop\tdata"
    tdesk = TDesktop(tdataFolder)

    # Using official iOS API with randomly generated device info
    # print(api) to see more
    api = API.TelegramIOS.Generate()

    # Convert TDesktop session to telethon client
    # CreateNewSession flag will use the current existing session to
    # authorize the new client by `Login via QR code`.
    client = await tdesk.ToTelethon("newSession.session", CreateNewSession, api)

    # Although Telegram Desktop doesn't let you authorize other
    # sessions via QR Code (or it doesn't have that feature),
    # it is still available across all platforms (APIs).

    # Connect and print all logged in devices
    await client.connect()
    await client.PrintSessions()

asyncio.run(main())

Authorization

opentele offers the ability to use official APIs, which are used by official apps. You can check that out here.

According to Telegram TOS: all accounts that sign up or log in using unofficial Telegram API clients are automatically put under observation to avoid violations of the Terms of Service.

It also uses the lang_pack parameter, of which telethon can't use because it's for official apps only.
Therefore, there are no differences between using opentele and official apps, the server can't tell you apart.

Incoming Features

  • Writing data to tdata for converting telethon sessions to tdesktop.
  • Random device information for initConnection to avoid spam-detection.
  • Add support for pyrogram.
  • Develop opentele-tui using textual for non-experience user.

Examples

The best way to learn anything is by looking at the examples. Am I right?

Documentation documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].