From 170818a6253f118204bd38e892d13de01abcc351 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Wed, 20 Jan 2016 20:52:57 +0100 Subject: [PATCH] Return entire chapter name as item title --- bridges/MangareaderBridge.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bridges/MangareaderBridge.php b/bridges/MangareaderBridge.php index 60fa8853..ec3bc8bf 100644 --- a/bridges/MangareaderBridge.php +++ b/bridges/MangareaderBridge.php @@ -8,7 +8,7 @@ class MangareaderBridge extends BridgeAbstract{ $this->name = "Mangareader Bridge"; $this->uri = "http://www.mangareader.net"; $this->description = "Returns the latest updates. Set limits to -1 to disable the limit."; - $this->update = "2016-01-16"; + $this->update = "2016-01-20"; $this->parameters["Get site updates"] = '[]'; $this->parameters["Get manga updates"] = ' @@ -103,10 +103,10 @@ class MangareaderBridge extends BridgeAbstract{ foreach ($chapters as $chapter){ $item = new \Item(); - $item->title = $xpath->query("td[1]/a", $chapter)->item(0)->nodeValue; // first column contains anchor with the name - $item->uri = 'http://www.mangareader.net' . $xpath->query("td[1]/a", $chapter)->item(0)->getAttribute('href'); // anchor includes path (with leading '/') - $item->description = substr($xpath->query("td[1]", $chapter)->item(0)->nodeValue, strlen($item->title) + 4); // first column provides " : ", we only want the description - $item->date = $xpath->query("td[2]", $chapter)->item(0)->nodeValue; // second column provides the release date + $item->title = $xpath->query("td[1]", $chapter)->item(0)->nodeValue; + $item->uri = 'http://www.mangareader.net' . $xpath->query("td[1]/a", $chapter)->item(0)->getAttribute('href'); + $item->description = substr($xpath->query("td[1]", $chapter)->item(0)->nodeValue, strrpos($item->title, ": ") + 2); + $item->date = $xpath->query("td[2]", $chapter)->item(0)->nodeValue; $item->content = $item->description . "
"; $this->items[] = $item; }