]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix previous wrt single-image imgur pages
authorAndrew Dolgov <noreply@fakecake.org>
Sun, 20 Mar 2016 09:03:39 +0000 (12:03 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Sun, 20 Mar 2016 09:03:39 +0000 (12:03 +0300)
plugins/af_redditimgur/init.php

index 3789886628b181f306112bb0a0d888c7201b3fc6..c481ab5b3dc1191bb489a06b1a2ade11f685b5cf 100755 (executable)
@@ -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) {