fix bug with youtube replacement
Marco Andronaco andronacomarco@gmail.com
Sun, 31 Dec 2023 13:36:48 +0100
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
telegram/replace.go
→
telegram/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", }, {