These are outdated as they haven't been updated for Pyrogram v1.
If you know what you're doing, feel free to use these as a guide.
For any questions, head to @PyrogramLounge.
@Pokurt has updated these scripts to Pyrogram v1
import telethon | |
from telethon.errors.rpcerrorlist import FloodWaitError | |
import asyncio | |
e = event | |
bot = c = cl = app = client | |
csm = client.send_message | |
ecid = event.chat_id | |
members = [] |
group = 'telethonchat' | |
print( | |
( | |
( | |
lambda c: ( | |
lambda ts: "\n".join( | |
f"{t} messages from {u}" for t, u in sorted(ts, key=lambda t: -t[0]) | |
) | |
)( | |
( |
import aioschedule as schedule | |
import asyncio | |
from telethon import TelegramClient | |
with TelegramClient( | |
os.path.abspath(fileName), | |
config.getint("api", "api_id"), | |
config.get("api", "api_hash"), | |
connection_retries=15, | |
retry_delay=3, |
// 3. satırı baştan sona kopyalamanız gerekmektedir. Çalışır örneğini 5. satırdaki linkten görebilirsiniz. | |
/(^[0\s]?[\s]?)([(]?)([5])([0-9]{2})([)]?)([\s]?)([0-9]{3})([\s]?)([0-9]{2})([\s]?)([0-9]{2})$/g | |
// https://regexr.com/5005l |
import os | |
import datetime | |
from pathlib import Path | |
from typing import List | |
from rfeed import Item, Feed, Guid, Image | |
from telethon import TelegramClient | |
from telethon.extensions.html import unparse | |
from telethon.tl import types | |
from telethon.tl.custom import Dialog, Message |
import asyncio | |
import os | |
from typing import List | |
import aiofiles | |
import httpx | |
async def download(client: httpx.AsyncClient, link: str, filename: str) -> None: | |
""" Download link """ |
def downloadFILE(url, name): | |
resp = requests.get(url=url, stream=True) | |
content_size = int(resp.headers['Content-Length']) / 1024 | |
with open(name, "wb") as f: | |
print("File total size is:", content_size, 'k,start...') | |
for data in tqdm(iterable=resp.iter_content(1024), total=content_size + 1, unit='k', desc=name): | |
f.write(data) | |
print(name + " download finished!") |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import subprocess | |
ytLists = { | |
'Hematology': 'https://www.youtube.com/watch?v=yF22BfXEO5g&list=PLTF9h-T1TcJh9T57G0nls2uGPzzHKMxxh', | |
'Biochemistry': 'https://www.youtube.com/watch?v=jJUoQMLMV2E&list=PLTF9h-T1TcJhcNo9M1VFXz6rMKT6CM_wd', | |
'Cardiovascular Physiology': 'https://www.youtube.com/watch?v=jU9w6w8LwqM&list=PLTF9h-T1TcJhp-1zjtApt2lVbQ2JHkY7b', | |
'Immunology': 'https://www.youtube.com/watch?v=LArxUakFsFs&list=PLTF9h-T1TcJj4AOPCxGxOUTH0IVmaH7_8&index=2&t=0s', |
These are outdated as they haven't been updated for Pyrogram v1.
If you know what you're doing, feel free to use these as a guide.
For any questions, head to @PyrogramLounge.
@Pokurt has updated these scripts to Pyrogram v1
def split_message(text, length=4096, offset=200): | |
return [text[text.find('\n', i - offset, i + 1) if text.find('\n', i - offset, i + 1) != -1 else i: | |
text.find('\n', i + length - offset, i + length) if text.find('\n', i + length - offset, | |
i + length) != -1 else i + length] for | |
i | |
in | |
range(0, len(text), length)] | |
# Usage, Using Pyrogram |