3
1
Back

$article['content']); if (preg_match("@.*?(.*)@", $article['content'], $matches)) { // $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); } elseif (strpos($title_text, $alt_text) !== false){ } elseif (strpos($alt_text, $title_text) !== False) { if ($img->getAttribute('title')) { // $xpath = $this->get_xpath_dealie($article['link']); $aftercomic = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); } // Dilbert elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] = $matches[1]; $img = $matches[1]; // Least I Could Do (wtf image size? Elseif (strpos($article['link'], 'threepanelsoul.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); $article['content'] = preg_replace("@@", '', $article['content']); // Joy of Tech // Joy of Tech elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); } // Scenes From A Multiverse (to get alt tags textified. Elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $img = preg_replace("@width=\"\d+\"@", "", $img); $img = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $img; } $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); } // Eat That Toast bog-standard example // Penny Arcade elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { // Three Panel Soul // Three Panel Soul // Three Panel Soul // Three Panel Soul elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE ) { // Breaking Cat News // Breaking Cat News elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { if (strpos($article["content"], "bonus panel!") !== FALSE) { // there's an arrow shaped hole you can avoid it. Wait and use in source and binary forms, with or without Mozilla Public License.

New Pull Request