๐‘ฏ๐’‚๐‘ช๐’Œ๐’†๐‘น , #๐‘ช๐’๐‘ซ๐’†
500 subscribers
119 photos
18 videos
22 files
28 links
Download Telegram
ููŠ ุดุฎุต ุงุจู†ู‡ ู…ุญุชุงุฌ ุนู„ุงุฌ ูˆุญุงู„ุชู‡ ุงู„ู…ุงุฏูŠู‡ ุชุญุช ุงู„ุตูุฑ ุงู„ู„ูŠ ูŠู‚ุฏุฑ ูŠุณุงุนุฏ ุจุญุงุฌุฉ ูŠุณุงุนุฏ ูˆุฑุจู†ุง ูŠุฌุนู„ู‡ุง ููŠ ู…ูŠุฒุงู† ุญุณู†ุงุชู‡

ุฏุง ุฑู‚ู… ุงู„ูƒุงุด ุจุชุงุนู‡: 01063915665
GroupFree.py
7.9 KB
โ€ข ู…ู„ู ุจูˆุช ู…ู† ุฎู„ุงู„ู‡ ุชุถูŠู ุญุณุงุจุงุช ูƒู„ ูŠูˆู… ุงูŠุณูˆูŠู„ูƒ 50 ูƒุฑูˆุจ + ุงูŠุฎู„ูŠ ุงู„ุณุฌู„ ุธุงู‡ุฑ + ูŠุฑุณู„ 5 ุฑุณุงุฆู„ ุงูŠููŠุฏูƒู… ุจุงู„ุชุฎุฒูŠู†
import os
import re
from telethon import TelegramClient, events
from telethon.tl.functions.stories import GetStoriesByIDRequest

id = 2610 # ุงูŠุจูŠ ุงูŠุฏูŠ
ah = "ุงูŠุจูŠ ู‡ุงุด"
ABBAS = TelegramClient("ABBAS", id, ah)

td = "tmp"
os.makedirs(td, exist_ok=True)

def px(u):
m = re.search(r't\.me/([^/?]+)/(?:s/|\?story=)(\d+)', u)
if m:
return m.group(1), int(m.group(2))
return None, None

def ge(st):
d = getattr(st.media, 'document', None)
if d:
for a in d.attributes:
if hasattr(a, 'file_name'):
ext = os.path.splitext(a.file_name)[1]
if ext:
return ext
if d.mime_type:
return '.' + d.mime_type.split('/')[-1]
return '.bin'

@ABBAS.on(events.NewMessage(pattern=r'^\.ุชุญู…ูŠู„ (.+)'))
async def dl(e):
lnk = e.pattern_match.group(1)
us, sid = px(lnk)

if not us or not sid:
await e.reply("ุงู„ุฑุงุจุท ู…ูˆ ุตุญูŠุญ")
return

try:
en = await ABBAS.get_entity(us)
rs = await ABBAS(GetStoriesByIDRequest(peer=en, id=[sid]))

if not rs.stories:
await e.reply("ุฎุทุฃ")
return

st = rs.stories[0]

md = getattr(st.media, 'document', None) or getattr(st.media, 'photo', None)
if not md:
await e.reply("ุฎุทุฃ")
return

ex = ge(st)
fp = os.path.join(td, f"st{sid}{ex}")

path = await ABBAS.download_media(md, file=fp)
if not path:
await e.reply("ุฎุทุฃ")
return

await ABBAS.send_file(e.chat_id, path)
os.remove(path)

except Exception as er:
await e.reply("ุตุงุฑ ุฎุทุฃ ุจุงู„ุชุญู…ูŠู„")
print("Err:", er)

ABBAS.start()
ABBAS.run_until_disconnected()

ุชุญู…ูŠู„ ุณุชูˆุฑูŠ ุชูŠู„ูŠุฌุฑุงู… ุนู† ุทุฑูŠู‚ ุงู…ุฑ

.ุชุญู…ูŠู„ + ุฑุงุจุท ุณุชูˆุฑูŠ

@UU_Mo
ู…ุชูˆูุฑ ุฌุฑูˆุจ 35k ู„ู„ุจูŠุน
- ุณูˆุฑุฉ ุงู„ูƒู‡ู ู†ูˆุฑ ู…ุงุจูŠู† ุงู„ุฌู…ุนุชูŠู† ๐ŸคŽ.
โค๏ธุชู… ุงุนุงุฏู‡ ุชุดุบูŠู„ ุจูˆุช ูƒูˆูŠู† ูˆุงุฎุฑ ุงู„ูŠูˆู… ู‡ู†ุฒู„ูƒู… ุงู„ู…ู…ูŠุฒุงุช๐Ÿ˜˜

๐Ÿคฉ@Queen110_bot ๐Ÿ˜˜
Please open Telegram to view this post
VIEW IN TELEGRAM
ุงุฑุณู„ ( ุงู„ุงูˆุงู…ุฑ )

ุนุดุงู† ุชุดูˆู ูƒู„ ุงู„ุงูˆุงู…ุฑ ุงู„ู…ูˆุฌูˆุฏุฉ ุจุงู„ุจูˆุช ุจู…ุฌุฑุฏ ุงู†ูƒ ุชุถุบุท ุนู„ู‰ ุงู„ุงุฒุงุฑูŠุฑ
( ุชูุนูŠู„ ุงู„ุชุญู‚ู‚ )
( ุชุนุทูŠู„ ุงู„ุชุญู‚ู‚ )
" ุฑุงุญ ูŠููŠุฏูƒ ุจุญู…ุงูŠุฉ ู…ุฌู…ูˆุนุชูƒ ู…ู† ุงู„ุจูˆุชุงุช ุงู„ู„ูŠ ุชุฏุฎู„ ูˆุชู†ุดุฑ ุงุนู„ุงู†ุงุช ุงูˆ ู…ู‚ุงุทุน ุงุจุงุญูŠู‡ ุนุดุงู† ูŠุจู†ุฏูˆู† ู…ุฌู…ูˆุนุชูƒ ุงูˆ ุงู„ุญุณุงุจุงุช ุงู„ุงูŠุฑุงู†ูŠู‡ ุงู„ู„ูŠ ู…ู†ุตุจ ููŠู‡ุง ุจูˆุชุงุช ุฑุงุญ ูŠู‚ูŠุฏู‡ู… ุงูˆู„ ู…ุงูŠุฏุฎู„ูˆู† ูˆูŠู†ููƒ ุงู„ุชู‚ูŠูŠุฏ ุงุฐุง ุถุบุท ุงู„ุฒุฑ ุงูˆ ุงุฐุง ุถุบุทู‡ ุงู„ู…ุงู„ูƒ "
ุจุญุซ ุจูŠ ุงูŠ ุณูˆุฑู‡ ู‚ุฑุงู† ู…ุญุชุงุฌู‡ ูƒู…ุง ู ุงู„ุตูˆุฑู‡
ูˆู„ุน ูŠุง ู‡ูƒุฑ
This media is not supported in your browser
VIEW IN TELEGRAM