Esempio n. 1
0
async def redirect(event) -> None:
    try:
        of = event.text.split(" ", 1)[1]
    except BaseException:
        return
    of = urlunparse(urlparse(of, "https"))
    async with session.get(of) as r:
        url = r.url
    await System.send_message(event.chat_id, f"URL: {url}")
Esempio n. 2
0
async def redirect(event) -> None:
    try:
        of = event.text.split(" ", 1)[1]
    except BaseException:
        return
    if not of.startswith('https://'):
        of = 'https://' + of
    async with session.get(of) as r:
        url = r.url
    await System.send_message(event.chat_id, f'URL: {url}')