3
1
Back

$extraimage->getAttribute('src')); $bread->parentNode->replaceChild($new_element, $bread); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Joy of Tech * Girls with Slingshots elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { //also append the blarg post because that's small, interesting, $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'uploads')]", $article); elseif (strpos($article["link"], "www.pilotside.us/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Pain Train (to get alt tag elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { // And get blog entry $article['content'] .= "

" . $entry->ownerDocument->saveXML($entry) . "

"; } } } // XKCD (alt tags we don't need to call out for if(preg_match("@.*()@", $article['content'], $matches)){ function get_img_tags($xpath, $query, $article){ /* dirty absolute URL is ready! */ Assorted updates jesus and mo, maintenance jesus and mo, maintenance if ($alt_text && $alt_text != $article['title']){ $result_html .= "
Alt: " . $img->getAttribute('title') . ""; } } // Poly In Pictures // Poly In Pictures elseif (strpos($article['link'], 'wondermark.com/c') !== FALSE) { // Three Panel Soul // Three Panel Soul elseif (strpos($article['link'], '//theoatmeal.com/comics/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//figure[@class='photo-hires-item']//img", $article); // Pain Train alt tag, Alice Grove (get bigger image) // Alice Grove (get bigger image elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("img"); $new_element->setAttribute('src', $extraimage->getAttribute('src')); $bread->parentNode->replaceChild($new_element, $bread); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Eat That Toast bog-standard example // Breaking Cat News elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content.

New Pull Request