From: Andrew Dolgov Date: Sun, 20 Mar 2016 09:03:39 +0000 (+0300) Subject: fix previous wrt single-image imgur pages X-Git-Tag: 16.3~18 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c80175bdd5b81bbdb27acfb7dec69bb1d45afefb;p=tt-rss.git fix previous wrt single-image imgur pages --- diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index 37898866..c481ab5b 100755 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -197,7 +197,7 @@ class Af_RedditImgur extends Plugin { if (preg_match("/^https?:\/\/(m\.)?imgur.com\/([^\.\/]+$)/", $entry->getAttribute("href"), $matches) || preg_match("/^https?:\/\/imgur.com\/(a|album|gallery)\/[^\.]+$/", $entry->getAttribute("href"), $matches)) { - _debug("Handling as an imgur gallery/album", $debug); + _debug("Handling as an imgur page/album/gallery", $debug); $album_content = fetch_file_contents($entry->getAttribute("href"), false, false, false, false, 10); @@ -235,7 +235,9 @@ class Af_RedditImgur extends Plugin { } } */ - $aentries = $axpath->query("//div[@class='post-image']/img[@src]"); + //if ($debug) print_r($album_content); + + $aentries = $axpath->query("(//div[@class='post-image']/img[@src] | //a[@class='zoom']/img[@src])"); $urls = []; foreach ($aentries as $aentry) {