Skip to content

Commit

Permalink
Multiple improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-bacart committed Oct 11, 2018
1 parent 69f01bd commit 93a3776
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Client/GuzzleClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,16 @@ public function getGuzzleResponseAsCrawler(
$method
);

$parseUrl = parse_url($uri);
$baseHref = trim($uri, '/');
$baseUri = rtrim(
$this->getConfig(GuzzleClientInterface::BASE_URI),
'/'
);

return new Crawler(
$stringResponse,
$uri,
$parseUrl['scheme'].'://'.$parseUrl['host']
$baseUri.'/'.$baseHref,
$uri
);
}

Expand Down

0 comments on commit 93a3776

Please sign in to comment.