From 147ac7d2cb222ceb872991534116aa556b66f81b Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Fri, 18 Sep 2020 16:13:03 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A7=D0=B8=D0=BD=D0=B8=D0=BC=20=D0=BF=D0=B0?= =?UTF-8?q?=D1=80=D1=81=D0=B5=D1=80=20=D0=B8=D0=BD=D1=81=D1=82=D0=B5=D0=B4?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Sources/Instead.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Sources/Instead.php b/app/Sources/Instead.php index ff18582..71876f3 100644 --- a/app/Sources/Instead.php +++ b/app/Sources/Instead.php @@ -22,7 +22,6 @@ use \App\Models\Game; use \App\Models\Platform; use \App\Models\Language; use \App\Models\Author; -use \App\Models\Tag; use \App\Source; use Log; @@ -62,9 +61,9 @@ class Instead extends Source { $game = new Game; $game->url = $url; $text = trim($this->dom->filter('#panel')->text()); - preg_match('/Дата: ([0-9]{4}\.[01][0-9]\.[0-3][0-9])/', $text, $matches); + preg_match('/Дата: ([0-9]{4}\.[01][0-9]\.[0-3][0-9]) /', $text, $matches); $game->release_date = \DateTime::createFromFormat('Y.m.d', $matches[1]); - preg_match('/Автор: (.+)/', $text, $matches); + preg_match('/Автор: (.+) Дата/', $text, $matches); $author = trim($matches[1]); $game->title = trim($this->dom->filter('h2')->first()->text()); $game = $this->findGame($game);