diff --git a/handlers/scraper/data.go b/handlers/scraper/data.go index 5742636..6762669 100644 --- a/handlers/scraper/data.go +++ b/handlers/scraper/data.go @@ -209,10 +209,7 @@ func (i *InstaData) ScrapeData() error { videoBlocked := strings.Contains(utils.B2S(body), "WatchOnInstagram") // Scrape from GraphQL API only if video is blocked or embed data is empty if videoBlocked || len(body) == 0 { - gqlValue, err := scrapeFromGQL(i.PostID) - if err != nil { - slog.Error("Failed to scrape data from scrapeFromGQL", "postID", i.PostID, "err", err) - } + gqlValue, _ := scrapeFromGQL(i.PostID) if gqlValue != nil && !strings.Contains(utils.B2S(gqlValue), "require_login") { gqlData = gjson.Parse(utils.B2S(gqlValue)).Get("data") slog.Info("Data parsed from GraphQL API", "postID", i.PostID) @@ -446,8 +443,6 @@ func scrapeFromGQL(postID string) ([]byte, error) { if err == nil && len(body) > 0 { return body, nil } - } else if err != nil { - slog.Error("Failed to scrape data from GraphQL API", "postID", postID, "err", err) } return nil, ErrNotFound }