diff --git a/handlers/embed.go b/handlers/embed.go index ab9d26c..7d537d7 100644 --- a/handlers/embed.go +++ b/handlers/embed.go @@ -1,6 +1,7 @@ package handlers import ( + "fmt" scraper "instafix/handlers/scraper" "instafix/utils" "instafix/views" @@ -69,13 +70,14 @@ func Embed(w http.ResponseWriter, r *http.Request) { // If User-Agent is not bot, redirect to Instagram viewsData.Title = "InstaFix" viewsData.URL = "https://instagram.com" + strings.Replace(r.URL.RequestURI(), "/"+mediaNumParams, "", 1) - if !utils.IsBot(r.Header.Get("User-Agent")) { - http.Redirect(w, r, viewsData.URL, http.StatusFound) - return - } + // if !utils.IsBot(r.Header.Get("User-Agent")) { + // http.Redirect(w, r, viewsData.URL, http.StatusFound) + // return + // } item, err := scraper.GetData(postID) if err != nil || len(item.Medias) == 0 { + fmt.Println(err) http.Redirect(w, r, viewsData.URL, http.StatusFound) return }