instagram: fix public instance with edge proxy

This commit is contained in:
stefanodvx 2025-04-20 01:07:02 +02:00
parent 6f5e792b01
commit 0786312feb

View file

@ -97,6 +97,7 @@ func GetCDNURL(contentURL string) (string, error) {
func GetPostCaption( func GetPostCaption(
postURL string, postURL string,
) (string, error) { ) (string, error) {
edgeProxyClient := util.GetEdgeProxyClient()
req, err := http.NewRequest( req, err := http.NewRequest(
http.MethodGet, http.MethodGet,
postURL, postURL,
@ -120,7 +121,7 @@ func GetPostCaption(
req.Header.Set("Cache-Control", "no-cache") req.Header.Set("Cache-Control", "no-cache")
req.Header.Set("TE", "trailers") req.Header.Set("TE", "trailers")
resp, err := httpSession.Do(req) resp, err := edgeProxyClient.Do(req)
if err != nil { if err != nil {
return "", fmt.Errorf("failed to send request: %w", err) return "", fmt.Errorf("failed to send request: %w", err)
} }