3
1
Back

Tweaking // The number of steps (sw11 footprint_depth = 1; $n > 0; $abs = preg_replace($re, '/', $abs, -1, $n)) { } function rel2abs($rel, $base) { $rel = trim($rel); $rel = trim($rel); if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { if (preg_match("@.*?(.*)@", $article['content'], $matches)) { $img = $matches[1]; $img = $matches[1]; } } Clean up code formatting; added a few comics; standardized appending alt/title text Added The Trenches; yet more code style tweaking elseif (strpos($article["link"], "manicpixienightmaregirls.com/") !== FALSE) { elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { $article['content'] .= "

" . $entry->textContent . "

"; } } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'comics')]", $article); } // Cyanide & Happiness // Cyanide & Happiness elseif (strpos($article['link'], 'www.robot-hugs.com/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); } // Awkward Zombie elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { // $xpath = new DOMDocument(); elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { // Dilbert elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); //also get blog elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { // only keep everything starting at the first // only keep everything starting at the first foreach($imgs as $img){ $article['content'] .= "
Alt: " . $img->getAttribute('title') .

New Pull Request