3
1
Back

Get_xpath_dealie($link){ list($html, $content_type) = $this->get_content($link); //Sites that provide images and just need alt tags elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div//img[contains(@src, 'images') and contains(@src, 'comics')]", $article); } elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // there's both alt and title texts, they're both different, use both. } elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { Clean up code formatting; added a few comics; standardized appending alt/title text elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { $article['content'] = $img; } } // Cyanide & Happiness elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE ) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("div"); $para_element = $doc->createElement("p"); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); function mangle_article($article) { if (preg_match("@.*?(.*)@", $article['content'], $matches)) { $article['content'] .= "

" . $entry->textContent . ""; // XKCD (alt tags.

New Pull Request