fix previous wrt single-image imgur pages

This commit is contained in:
Andrew Dolgov 2016-03-20 12:03:39 +03:00
parent ec482d2840
commit c80175bdd5
1 changed files with 4 additions and 2 deletions

View File

@ -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) {