Skip to content

Instantly share code, notes, and snippets.

@New-dev0
New-dev0 / TeleToPyroSTRING.py
Last active September 30, 2024 14:42
Script to Convert Telethon's StringSession to Pyrogram's
# Both Telethon and Pyrogram should be Installed
# Made only for Educational Purpose
# New-dev0 (2021)
import struct, base64
from telethon.sessions.string import StringSession
from telethon.sync import TelegramClient
from pyrogram.storage.storage import Storage
from pyrogram import utils
@New-dev0
New-dev0 / quotefancy.py
Created March 23, 2021 05:30
download/get random quotes from quotefancy.com
# A script to get/download random quotes from
# QuoteFancy.com in form of text or images ...
import random
import urllib
from urllib import urlopen
from bs4 import BeautifulSoup as bs
@painor
painor / FastTelethon.py
Last active October 14, 2024 08:25
This will increase the download/upload speed when using telethon
# copied from https://github.com/tulir/mautrix-telegram/blob/master/mautrix_telegram/util/parallel_file_transfer.py
# Copyright (C) 2021 Tulir Asokan
import asyncio
import hashlib
import inspect
import logging
import math
import os
from collections import defaultdict
from typing import Optional, List, AsyncGenerator, Union, Awaitable, DefaultDict, Tuple, BinaryIO