Archived
1
0
Fork 0

улучшения квестбука

This commit is contained in:
Alexander Yakovlev 2018-04-03 19:08:07 +07:00
parent 60420eaff0
commit 361ff14b2a

View file

@ -30,6 +30,7 @@ class Questbook extends Source {
$game = new Game;
$game->title = trim($gameBlock['title']);
$game->url = trim($gameBlock['link']);
$game->url = str_replace('http://', 'https://', $game->url);
$game->description = trim($gameBlock['description']);
$this->output .= $game->print();
}
@ -41,6 +42,7 @@ class Questbook extends Source {
$game = new Game;
$game->url = $url;
$game->title = $this->dom->filter('h2 a b')->first()->text();
$game->platform = 'Книга-игра';
$game->description = $this->dom->filter('div.col-md-8.col-sm-12 > div > div')->reduce(function($node) {
if ($node->attr('style') === 'padding:5px;margin:2px;text-align:justify')
return true;