Avoid bot exclusion.
This commit is contained in:
parent
be3620acb7
commit
9fc1e97efe
1 changed files with 8 additions and 1 deletions
|
@ -161,7 +161,14 @@ class LeBonCoinBridge extends BridgeAbstract {
|
|||
);
|
||||
|
||||
$url = self::URI . 'recherche/?' . http_build_query($params);
|
||||
$html = getContents($url)
|
||||
|
||||
$header = array(
|
||||
'Accept: text/html',
|
||||
'Accept-Language: ' . getEnv('HTTP_ACCEPT_LANGUAGE'),
|
||||
'Accept-Encoding: identity'
|
||||
);
|
||||
|
||||
$html = getContents($url, $header)
|
||||
or returnServerError('Could not request LeBonCoin. Tried: ' . $url);
|
||||
|
||||
if(!preg_match('/^<script>window.FLUX_STATE[^\r\n]*/m', $html, $matches)) {
|
||||
|
|
Loading…
Reference in a new issue