From c80175bdd5b81bbdb27acfb7dec69bb1d45afefb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 20 Mar 2016 12:03:39 +0300 Subject: [PATCH] fix previous wrt single-image imgur pages --- plugins/af_redditimgur/init.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index 378988662..c481ab5b3 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) {