]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix for yet another dilbert changes
authorAndrew Dolgov <noreply@fakecake.org>
Thu, 15 Jan 2015 06:23:45 +0000 (09:23 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Thu, 15 Jan 2015 06:23:45 +0000 (09:23 +0300)
plugins/af_comics/filters/af_comics_dilbert.php

index 67d9788ab44de3efd6dcd680fdfbdfad416dd937..5faba7eb7f2530ffb1667bbd930f1147b5b0ad58 100644 (file)
@@ -6,7 +6,7 @@ class Af_Comics_Dilbert extends Af_ComicFilter {
        }
 
        function process(&$article) {
-               if (strpos($article["guid"], "dilbert.com") !== FALSE) {
+               if (strpos($article["link"], "dilbert.com") !== FALSE) {
                                $res = fetch_file_contents($article["link"], false, false, false,
                                         false, false, 0,
                                         "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)");
@@ -24,7 +24,7 @@ class Af_Comics_Dilbert extends Af_ComicFilter {
                                if ($doc) {
                                        $xpath = new DOMXPath($doc);
 
-                                       $basenode = $xpath->query('//div[@class="STR_Image"]')->item(0);
+                                       $basenode = $xpath->query('//img[contains(@class, "img-comic")]')->item(0);
 
                                        /* $entries = $xpath->query('(//img[@src])'); // we might also check for img[@class='strip'] I guess...