From f1b28cfde42c981346819fa8d24e3de7e10ee946 Mon Sep 17 00:00:00 2001 From: Nulo Date: Sun, 6 Nov 2022 16:54:58 -0300 Subject: [PATCH] Tomar links tiktok.com --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 0de5a75..d9c0595 100644 --- a/main.go +++ b/main.go @@ -58,16 +58,18 @@ func handleMessage(bot *tgbotapi.BotAPI, update tgbotapi.Update) { continue } - if url.Hostname() != "vm.tiktok.com" { + if url.Hostname() != "vm.tiktok.com" && url.Hostname() != "tiktok.com" { if explicit { bot.Send(respondWithMany(msg, "La URL ", urlString, " no es de TikTok.")) } continue } hasDownloadables = true + // tikmate no entiende tiktok.com + url.Host = "vm.tiktok.com" log.Printf("Downloading %s", urlString) - lookup, err := Lookup(urlString) + lookup, err := Lookup(url.String()) if err != nil { bot.Send(respondWithMany(msg, "Hubo un error al descargar ", urlString, ".")) continue