You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Http/CurlDispatcher.php
+3-3
Original file line number
Diff line number
Diff line change
@@ -102,9 +102,9 @@ public function dispatch(Url $url)
102
102
103
103
$response = $this->exec($url, $options);
104
104
105
-
//Some sites returns 403 with the default user-agent
106
-
if ($response->getStatusCode() === 403) {
107
-
$options[CURLOPT_USERAGENT] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36';
105
+
//Some sites returns 400 or 403 with the default user-agent
106
+
if ($response->getStatusCode() === 400 || $response->getStatusCode() === 403) {
107
+
$options[CURLOPT_USERAGENT] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36';
0 commit comments