]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix explosm comics plugin
authorAndrew Dolgov <noreply@fakecake.org>
Fri, 12 Dec 2014 09:23:33 +0000 (12:23 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Fri, 12 Dec 2014 09:23:33 +0000 (12:23 +0300)
plugins/af_comics/filters/af_comics_explosm.php

index cba7ad0adec650e944976f7b7ab910bc0b17b6e6..30b7e24c93efb40f7ce0c5eac96cbaae7f24bb90 100644 (file)
@@ -17,18 +17,7 @@ class Af_Comics_Explosm extends Af_ComicFilter {
 
                                if ($doc) {
                                        $xpath = new DOMXPath($doc);
-                                       $entries = $xpath->query('(//img[@src])'); // we might also check for img[@class='strip'] I guess...
-
-                                       $matches = array();
-
-                                       foreach ($entries as $entry) {
-
-                                               if (preg_match("/(http:\/\/.*\/db\/files\/Comics\/.*)/i", $entry->getAttribute("src"), $matches)) {
-
-                                                       $basenode = $entry;
-                                                       break;
-                                               }
-                                       }
+                                       $basenode = $xpath->query('(//img[@id="main-comic"])')->item(0);
 
                                        if ($basenode) {
                                                $article["content"] = $doc->saveXML($basenode);