Compare commits
No commits in common. "702519ddc77d0ad650c69f809c9ca871a61cbb57" and "ef658e46414a7c9bd8c0d48542e6a4aaa4a3956f" have entirely different histories.
702519ddc7
...
ef658e4641
2 changed files with 0 additions and 7 deletions
5
main.go
5
main.go
|
@ -8,7 +8,6 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"unicode/utf16"
|
"unicode/utf16"
|
||||||
"errors"
|
|
||||||
|
|
||||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||||
"nulo.in/dlbot/common"
|
"nulo.in/dlbot/common"
|
||||||
|
@ -31,9 +30,6 @@ func (fu FileURL) UploadData() (string, io.Reader, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", nil, err
|
return "", nil, err
|
||||||
}
|
}
|
||||||
if res.StatusCode != http.StatusOK {
|
|
||||||
return "", nil, errors.New(res.Status)
|
|
||||||
}
|
|
||||||
return "url.mp4", res.Body, nil
|
return "url.mp4", res.Body, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +90,6 @@ func (config Config) handleMessage(bot *tgbotapi.BotAPI, update tgbotapi.Update)
|
||||||
_, err := bot.Send(res)
|
_, err := bot.Send(res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Error subiendo", url.String(), err)
|
log.Println("Error subiendo", url.String(), err)
|
||||||
bot.Send(respondWithMany(update.Message, "Hubo un error al descargar ", url.String(), "."))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
// alternativa: https://github.com/Evil0ctal/Douyin_TikTok_Download_API
|
|
||||||
|
|
||||||
type lookupResponse struct {
|
type lookupResponse struct {
|
||||||
AuthorAvatar string `json:"author_avatar"`
|
AuthorAvatar string `json:"author_avatar"`
|
||||||
AuthorID string `json:"author_id"`
|
AuthorID string `json:"author_id"`
|
||||||
|
|
Reference in a new issue