oreolek
/
news-script
Archived
1
0
Fork 0

Fix IFDB in case RSS has errors

This commit is contained in:
Alexander Yakovlev 2019-01-18 16:45:40 +07:00
parent aa66689189
commit 99b4467cca
Signed by: oreolek
GPG Key ID: 1CDC4B7820C93BD3
1 changed files with 4 additions and 0 deletions

View File

@ -25,6 +25,10 @@ class IFDB extends Source {
protected function parse() {
$service = new \Sabre\Xml\Service();
$xml = $this->get_text("http://ifdb.tads.org/allnew-rss");
$xml = tidy_repair_string($xml, [
'output-xml' => true,
'input-xml' => true
]);
$service->elementMap = [
'{}item' => function(\Sabre\Xml\Reader $reader) {
$game = new Game;