Skip to content

Commit ff29a65

Browse files
Twitter extractor redirect issue php-embed#532
1 parent e41c7ce commit ff29a65

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/Http/Crawler.php

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class Crawler implements ClientInterface, RequestFactoryInterface, UriFactoryInt
2323
public function __construct(?ClientInterface $client = null, ?RequestFactoryInterface $requestFactory = null, ?UriFactoryInterface $uriFactory = null)
2424
{
2525
$this->client = $client ?: new CurlClient();
26+
$this->client->setSettings([
27+
'follow_location' => false,
28+
]);
2629
$this->requestFactory = $requestFactory ?: FactoryDiscovery::getRequestFactory();
2730
$this->uriFactory = $uriFactory ?: FactoryDiscovery::getUriFactory();
2831
}

0 commit comments

Comments
 (0)