Skip to content

Commit

Permalink
fixed #1100, fixed csrf token pattern (#1106)
Browse files Browse the repository at this point in the history
  • Loading branch information
NabiKAZ authored Nov 19, 2022
1 parent 3c02caa commit 17c265e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/InstagramScraper/Instagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -2210,7 +2210,7 @@ public function login($force = false, $twoStepVerificator = null)
throw new InstagramException('Response code is ' . $response->code . ': ' . static::httpCodeToString($response->code) . '.' .
'Something went wrong. Please report issue.', $response->code, static::getErrorBody($response->body));
}
preg_match('/"csrf_token":"(.*?)"/', $response->body, $match);
preg_match('/\\\\"csrf_token\\\\":\\\\"(.*?)\\\\"/', $response->body, $match);
$csrfToken = isset($match[1]) ? $match[1] : '';
$cookies = $this->parseCookies($response->headers);

Expand Down

0 comments on commit 17c265e

Please sign in to comment.