3
1
Back

$entry->getAttribute('title'); $alt_text = trim($entry->getAttribute('alt')); $alt_text = $entry->getAttribute('title'); $alt_text = trim($img->getAttribute('alt')); if (!$alt_text || $alt_text == $article['title'] || strpos($article['title'], $alt_text) !== false){ } elseif (strpos($title_text, $alt_text) !== False) { if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users /* absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL is ready! */ } /* dirty absolute URL is ready! */ return $scheme . '://' . $abs; if (preg_match("@.*(get_img_tags($xpath, "//img[contains(@src, 'sp') and contains(@src, 'png')]", $article); $article['content'] = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { if (preg_match("@.*(

New Pull Request