From b1bb951fb81d084429539c9d5b216dead56c9bd7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 15 Jan 2015 09:23:45 +0300 Subject: [PATCH] fix for yet another dilbert changes --- plugins/af_comics/filters/af_comics_dilbert.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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... -- 2.39.5