From: Andrew Dolgov Date: Thu, 15 Jan 2015 06:23:45 +0000 (+0300) Subject: fix for yet another dilbert changes X-Git-Tag: 16.3~384 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b1bb951fb81d084429539c9d5b216dead56c9bd7;p=tt-rss.git fix for yet another dilbert changes --- diff --git a/plugins/af_comics/filters/af_comics_dilbert.php b/plugins/af_comics/filters/af_comics_dilbert.php index 67d9788a..5faba7eb 100644 --- a/plugins/af_comics/filters/af_comics_dilbert.php +++ b/plugins/af_comics/filters/af_comics_dilbert.php @@ -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...