all repos — escarbot @ 32016cd9c0d6e499d50048f30a8a9c103a68f62e

Earthbound Café's custom Telegram bot, with lots of cool utilities built-in.

fix bug with youtube replacement
Marco Andronaco andronacomarco@gmail.com
Sun, 31 Dec 2023 13:36:48 +0100
commit

32016cd9c0d6e499d50048f30a8a9c103a68f62e

parent

ce092d95ef121e00ce953180f9aeb7cc56a0134a

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M telegram/replace.gotelegram/replace.go

@@ -17,7 +17,7 @@ var linkMessage = "[🔗](%s) Da %s."

var regexFlags = "(?i)(?m)" var replacers = []Replacer{ { - Regex: regexp.MustCompile(regexFlags + `(?:(?:https?:)?\/\/)?(?:(?:www|m)\.)?(?:(?:youtube(?:-nocookie)?\.com|youtu.be))(?:\/(?:[\w\-]+\?v=|embed\/|live\/|v\/|shorts\/)?)([\w\-]+)(\S+)?`), + Regex: regexp.MustCompile(regexFlags + `(?:(?:https?:)?\/\/)?(?:(?:www|m)\.)?(?:(?:youtube(?:-nocookie)?\.com|youtu.be))(?:\/(?:[\w\-]+\?v=|embed\/|live\/|v\/|shorts\/)?)([\w\-]+)`), Format: "https://y.outube.duckdns.org/%s", }, {