Tomar links tiktok.com
This commit is contained in:
parent
21364a22e6
commit
f1b28cfde4
1 changed files with 4 additions and 2 deletions
6
main.go
6
main.go
|
@ -58,16 +58,18 @@ func handleMessage(bot *tgbotapi.BotAPI, update tgbotapi.Update) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if url.Hostname() != "vm.tiktok.com" {
|
if url.Hostname() != "vm.tiktok.com" && url.Hostname() != "tiktok.com" {
|
||||||
if explicit {
|
if explicit {
|
||||||
bot.Send(respondWithMany(msg, "La URL ", urlString, " no es de TikTok."))
|
bot.Send(respondWithMany(msg, "La URL ", urlString, " no es de TikTok."))
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
hasDownloadables = true
|
hasDownloadables = true
|
||||||
|
// tikmate no entiende tiktok.com
|
||||||
|
url.Host = "vm.tiktok.com"
|
||||||
|
|
||||||
log.Printf("Downloading %s", urlString)
|
log.Printf("Downloading %s", urlString)
|
||||||
lookup, err := Lookup(urlString)
|
lookup, err := Lookup(url.String())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
bot.Send(respondWithMany(msg, "Hubo un error al descargar ", urlString, "."))
|
bot.Send(respondWithMany(msg, "Hubo un error al descargar ", urlString, "."))
|
||||||
continue
|
continue
|
||||||
|
|
Reference in a new issue