3
1
Back

$fetch_last_content_type; $html = fetch_file_contents($link); $content_type = $fetch_last_content_type; function rel2abs($rel, $base) { if (!$title_text || $title_text == $article['title'] || strpos($article['title'], $alt_text) !== false){ $text_element = $doc->createElement("i", $alt_text); $title_element = $doc->createElement("i", $alt_text); $para_element->appendChild($alt_element); $para_element->appendChild($doc->createElement("br")); $title_element = $doc->createElement("i", $alt_text); $para_element->appendChild($alt_element); $para_element->appendChild($doc->createElement("br")); $title_element = $doc->createElement("i", $alt_text); $para_element->appendChild($text_element); } elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { // Wondermark (alt tag already present) // Wondermark (alt tag already present foreach($imgs as $img){ $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } Dead Philosophers elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='img-comic-container']//img", $article); } // Breaking Cat News elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // $article['content'] = $matches[1]; elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE ) { // Two Lumps elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Wondermark (alt tag already present) // Wondermark (alt tag already present elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ //also get blog entry $entries .

New Pull Request