diff --git a/src/InstagramScraper/Instagram.php b/src/InstagramScraper/Instagram.php index 9472db70..43204f27 100644 --- a/src/InstagramScraper/Instagram.php +++ b/src/InstagramScraper/Instagram.php @@ -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);