3
1
Back

$this->get_xpath_dealie($article['link']); // elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== 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, "//img[starts-with(@src, 'sp') and contains(@src, 'png')]", $article); } // CTRL+ALT+DEL elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { // $img_tag = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); // $img_tag = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Poly In Pictures elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { // replace the

(containing project wonderful) with nothing $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image']", $article); } // Cyanide & Happiness elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE && // SatW elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE ) { $img_tag = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'jpg')]", $article, "http://vgcats.com/comics/"); // Invisible Bread (make the bread visible $bread_page_url = $bread->getAttribute('href'); $xpath = new DOMXPath($doc); return $xpath; } function get_content($link) { * When debugging or writing a new fetcher, use the first if (preg_match("@.*(get_img_tags($xpath, '(//img[@id="main-comic"])', $article); $article['content'] .= "
$orig_content
"; // Awkward Zombie elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { $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='imgdiv']//img", $article); //also get blog entry $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { // Something Positive Some comics supported elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $article['content'] .= "

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

"; // Wondermark (alt tag already present foreach($imgs as $img){ // Questionable Content (cleanup) elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']//img", $article); } // Joy of Tech // Joy of Tech elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); } // Two Lumps elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] .= "
ID: " . $img->getAttribute('title') . ""; } } Invisible Bread, Softer World (alt tags), Dinosaur Comics (alt tags+blog), CAD, attempt at OOTS (but that one fails due to the back is probably the most ordinary.

New Pull Request