Даты для игр INSTEAD
This commit is contained in:
parent
5acb536617
commit
6b005fb6a9
|
@ -40,10 +40,10 @@ class Instead extends Source {
|
|||
unset($text);
|
||||
$game = new Game;
|
||||
$game->url = $url;
|
||||
$game->platform = 'INSTEAD';
|
||||
$text = trim($this->dom->filter('#panel')->text());
|
||||
preg_match('/Дата: ([0-9]{4}\.[01][0-9]\.[0-3][0-9])Размер/', $text, $matches);
|
||||
$date = \DateTime::createFromFormat('Y.m.d', $matches[1]);
|
||||
$date = $date->format('U');
|
||||
$game->date = \DateTime::createFromFormat('Y.m.d', $matches[1]);
|
||||
preg_match('/Автор: (.+)Дата/', $text, $matches);
|
||||
$game->author = trim($matches[1]);
|
||||
$game->title = trim($this->dom->filter('h2')->first()->text());
|
||||
|
|
Reference in a new issue