3
1
Back

$aftercomic; $article['content'] .= "Alt: " . $img->getAttribute('title') . ""; } } // Invisible Bread (make the bread visible $bread_page_url = $bread->getAttribute('href'); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace("@@", '', $article['content']); // Penny Arcade if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $doc = new DOMDocument(); elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { // only keep everything starting at the top surface of the panel } // Something Positive if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; } // SatW elseif (strpos($article["link"], "chainsawsuit.com/comic/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); if (preg_match("@.*?(.*)@", $article['content'], $matches)) { if (strpos($article["content"], "bonus panel!") !== FALSE) { // Poorly Drawn Lines elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Scenes From A Multiverse (to get alt tags textified. $article['content'] .= $aftercomic; } } // Questionable Content (cleanup elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'png')]", $article); } // Dead Philosophers // Dead Philosophers elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; // Least I Could Do (wtf image size?) $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'] = preg_replace('#(width|height)="150"#', '', $article['content']); // Penny Arcade if(preg_match("@.*()@", $article['content'], $matches)){ if (preg_match("@.*(ownerDocument->saveXML($entry) . "

"; } } // SatW elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $imgs = $xpath->query('//img'); //doesn't get simpler than having hundreds of plugins, one per feed. The file will get big, but whatever. From dd8fda85b17279e6d8dbcb525c226736e6399cf9 Mon Sep 17 00:00:00 2001 .../Panels/UNSEEN SERVANT.png.

New Pull Request