Exemplo n.º 1
0
async def listrss(client, message):
    pablo = await edit_or_reply(message, "`Processing....`")
    damn = basic_check(message.chat.id)
    if not damn:
        await pablo.edit("This Chat Has No RSS!")
        return
    links = ""
    all = get_chat_rss(message.chat.id)
    for x in all:
        l = x.get("rss_link")
        links += f"{l}\n"
    content = f"Rss Found In The Chat Are : \n\n{links}"
    await client.send_message(message.chat.id, content)
    await pablo.delete()
Exemplo n.º 2
0
async def testrss(client, message):
    pablo = await edit_or_reply(message, "`Processing....`")
    damn = basic_check(message.chat.id)
    if not damn:
        URL = "https://www.reddit.com/r/funny/new/.rss"
        rss_d = feedparser.parse(URL)
        Content = rss_d.entries[0]["title"] + "\n\n" + rss_d.entries[0]["link"]
        await client.send_message(message.chat.id, Content)
        await pablo.edit("This Chat Has No RSS So Sent Reddit RSS")
    else:
        all = get_chat_rss(message.chat.id)
        for x in all:
            link = x.get("rss_link")
            rss_d = feedparser.parse(link)
            content = ""
            content += f"**{rss_d.entries[0].title}**"
            content += f"\n\nLink : {rss_d.entries[0].link}"
            try:
                content += f"\n{rss_d.entries[0].description}"
            except:
                pass
            await client.send_message(message.chat.id, content)
        await pablo.delete()