Generate direct download links for Telegram media using Pyrogram
Project description
PyroLinks
A simple Pyrogram-based module to create streaming download links for Telegram files !
pip install pyrolinks
🍺Example
from pyrogram import Client, filters
from pyrogram.types import Message
from pyrolinks.client import PyroLinks, compose
from pyrolinks.errors import PyroLinksError
app = Client(
"pyrolinks",
api_id=123456,
api_hash="abcd",
token="123:abc",
)
links = PyroLinks(
app,
schema="http",
domain="example.com",
ip="0.0.0.0",
port=8080,
route="/dl",
logger=logging.getLogger("PyroLinks"),
)
@app.on_message(filters.private & (filters.document | filters.video | filters.audio | filters.photo))
async def handler(client, message: Message):
try:
link = await links.generate_link(message)
await message.reply(f"✅ Direct link:\n{link}")
except PyroLinksError as e:
await message.reply(f"❌ Error: {e}")
compose([links])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyrolinks-3.1.tar.gz
(8.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrolinks-3.1.tar.gz.
File metadata
- Download URL: pyrolinks-3.1.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cb6e13d69af01a4c23667c56a0fe7151b25bee1f11a856a70c610d2be388cc7
|
|
| MD5 |
8c2d870ebcfd1a554f439359ff008219
|
|
| BLAKE2b-256 |
a0d755ff853f59818d2741fc54feef2c59f42e995cd354eb0389127d237d1664
|
File details
Details for the file pyrolinks-3.1-py3-none-any.whl.
File metadata
- Download URL: pyrolinks-3.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51ec14d95dd86c5ac0ee1b60e28e20a07d28512404c8f9b86e5f288744118559
|
|
| MD5 |
8c56a352c496acbb1318d3517d9a8b6f
|
|
| BLAKE2b-256 |
f25d65715bc3a2226d3a61c8703b29170a99c12160c89c235d87060056337b54
|