From 4423dad50408248944ca5db5d9c5dd0dd2fce1a7 Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Wed, 16 May 2018 11:47:37 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BF=D0=B0=D1=80=D1=81=D0=B5=D1=80=20=D0=B2=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=B9=20RSS=20=D0=BA=D0=B2=D0=B5=D1=81=D1=82=D0=B1=D1=83?= =?UTF-8?q?=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/Questbook.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Questbook.php b/Source/Questbook.php index 00eca6d..f7d42d2 100644 --- a/Source/Questbook.php +++ b/Source/Questbook.php @@ -23,7 +23,12 @@ use \Game; class Questbook extends Source { public $title = "Библиотека книг-игр"; protected function parse() { - $string = $this->get_text('https://quest-book.ru/directory/rss/'); + $this->parseFeed('https://quest-book.ru/directory/rss/'); + $this->parseFeed('https://quest-book.ru/online/rss.xml'); + } + protected function parseFeed($feedUrl) { + $string = $this->get_text($feedUrl); + $string = mb_convert_encoding($string, 'UTF-8', 'auto'); $service = new \Sabre\Xml\Service(); $service->elementMap = [ '{}item' => function(\Sabre\Xml\Reader $reader) { @@ -53,7 +58,7 @@ class Questbook extends Source { } } public function checkPage($url) { - return (strpos($url,'https://quest-book.ru/directory/') !== FALSE); + return (strpos($url,'https://quest-book.ru/') !== FALSE); } public function page($url) { $game = new Game;