Skip to content

Commit 08a3ad7

Browse files
revert some endpoint changes in API
1 parent 46afabc commit 08a3ad7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Instagram/InstagramAPI.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function fetchProfile($username)
119119
],
120120
'cookies' => $this->cookie
121121
];
122-
return $this->SendRequest('GET', "https://www.instagram.com/$username/", $options);
122+
return $this->SendRequest('GET', Uri::USER_PROFILE_URL . $username, $options);
123123
}
124124
public function fetchHighlight($url, $opt = 'first_response')
125125
{
@@ -137,10 +137,10 @@ public function fetchHighlight($url, $opt = 'first_response')
137137
'cookies' => $this->cookie
138138
];
139139
try {
140-
$result = json_decode($this->SendRequest('GET', "https://www.instagram.com/reels/highlight%3A" . $matches[1], $options));
140+
$result = json_decode($this->SendRequest('GET', Uri::REELS_URL . 'highlight%3A' . $matches[1], $options));
141141
} catch (Exception $e) {
142142
preg_match('/www.instagram.com\/s\/(.+)[?]/', $url, $matches2);
143-
$result = json_decode($this->SendRequest('GET', "https://www.instagram.com/reels/" . base64_decode($matches2[1]), $options));
143+
$result = json_decode($this->SendRequest('GET', Uri::REELS_URL . base64_decode($matches2[1]), $options));
144144
}
145145
break;
146146
default:

0 commit comments

Comments
 (0)