instagram: new extraction method

new extraction method first tries to fetch content directly from instagram graphql API, fallback to html embed page. in case every method fail, rely on 3rd party
This commit is contained in:
stefanodvx 2025-04-23 18:52:05 +02:00
parent 1b3c426808
commit 93e964a28b
10 changed files with 494 additions and 110 deletions

View file

@ -3,7 +3,6 @@ package core
import (
"context"
"fmt"
"log"
"sync"
"time"
@ -238,11 +237,7 @@ func StartInlineTask(
IsPersonal: true,
},
)
if err != nil {
log.Println("failed to answer inline query:", err)
}
if !ok {
log.Println("failed to answer inline query")
if err != nil || !ok {
return nil
}
SetTask(taskID, dlCtx)

View file

@ -10,9 +10,7 @@ import (
var startMessage = "govd is an open-source telegram bot " +
"that allows you to download medias from " +
"various platforms. the project born after " +
"the discontinuation of an " +
"highly popular bot, known as UVD."
"various platforms."
func getStartKeyboard(bot *gotgbot.Bot) gotgbot.InlineKeyboardMarkup {
return gotgbot.InlineKeyboardMarkup{