Skip to content

Commit

Permalink
Introdotta instant preview
Browse files Browse the repository at this point in the history
  • Loading branch information
barbax7 committed Dec 17, 2023
1 parent 717eff4 commit 0cd35ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion edisubot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def sostituisci_link_con_testo(m: Message):

url: str = re.search(r'https:\/\/\S+', m.text).group(0)
new = re.sub(r"https:\/\/\S+", f"<a href='{url}'>Leggi l'articolo sul sito EDISU qui.</a>", m.html_text)

instant = "https://a.devs.today/" + url
new = "<a href='{}'>‎</a>".format(instant) + new
bot.edit_message_text(new, m.chat.id, m.id)

@bot.inline_handler(lambda x: True)
Expand Down

0 comments on commit 0cd35ed

Please sign in to comment.