Улучшения парсера INSTEAD
This commit is contained in:
parent
408622afea
commit
5acb536617
|
@ -53,7 +53,14 @@ class Instead extends Source {
|
|||
$game->url_online_description = 'Играть онлайн';
|
||||
}
|
||||
$game->url_download = $this->baseUrl.ltrim($this->dom->selectLink('Скачать')->first()->attr('href'), '/');
|
||||
$game->url_discussion = $this->dom->selectLink('Обсудить')->first()->attr('href');
|
||||
$link = $this->dom->selectLink('Обсудить')->first();
|
||||
if ($link->count() > 0) {
|
||||
$game->url_discussion = $link->attr('href');
|
||||
}
|
||||
$image = $this->dom->filter('#screenshots a')->first();
|
||||
if ($image->count() > 0) {
|
||||
$game->image = $this->baseUrl.$image->attr('href');
|
||||
}
|
||||
return $game;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue