Skip to content

Commit 17c265e

Browse files
authored
fixed #1100, fixed csrf token pattern (#1106)
1 parent 3c02caa commit 17c265e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/InstagramScraper/Instagram.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2210,7 +2210,7 @@ public function login($force = false, $twoStepVerificator = null)
22102210
throw new InstagramException('Response code is ' . $response->code . ': ' . static::httpCodeToString($response->code) . '.' .
22112211
'Something went wrong. Please report issue.', $response->code, static::getErrorBody($response->body));
22122212
}
2213-
preg_match('/"csrf_token":"(.*?)"/', $response->body, $match);
2213+
preg_match('/\\\\"csrf_token\\\\":\\\\"(.*?)\\\\"/', $response->body, $match);
22142214
$csrfToken = isset($match[1]) ? $match[1] : '';
22152215
$cookies = $this->parseCookies($response->headers);
22162216

0 commit comments

Comments
 (0)