From 91b29bb1996d17f781cfb71874421e97a64212d1 Mon Sep 17 00:00:00 2001 From: markfullmer Date: Wed, 3 Apr 2024 12:13:33 -0700 Subject: [PATCH] Twitter extractor will retrieve "/home" instead of a tweet URL --- src/Http/Crawler.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Http/Crawler.php b/src/Http/Crawler.php index 933b3bbf..fbcfe5e1 100644 --- a/src/Http/Crawler.php +++ b/src/Http/Crawler.php @@ -23,6 +23,9 @@ class Crawler implements ClientInterface, RequestFactoryInterface, UriFactoryInt public function __construct(ClientInterface $client = null, RequestFactoryInterface $requestFactory = null, UriFactoryInterface $uriFactory = null) { $this->client = $client ?: new CurlClient(); + $this->client->setSettings([ + 'follow_location' => false, + ]); $this->requestFactory = $requestFactory ?: FactoryDiscovery::getRequestFactory(); $this->uriFactory = $uriFactory ?: FactoryDiscovery::getUriFactory(); }