3
1
Back

J11 | 3 From 2118197c1e2cab02a4a0c4b6381e9d7946ff4f12 Mon Sep 17 00:00:00 2001 Subject: [PATCH] Gunnerkrigg and cleanup of alt-tag-only sites elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); } // Camp Weedonwantcha // Camp Weedonwantcha elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='timeline-description']", $article); } Invisible Bread, Softer World (alt tags), Dinosaur Comics (alt tags+blog), CAD, attempt at OOTS (but that one fails due to referer checks elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']//img", $article); } // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { // CTRL+ALT+DEL // Three Panel Soul elseif (strpos($article['link'], 'https://web3isgoinggreat.com/single/') !== FALSE) { $doc = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this } //No matches if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { // Dead Philosophers elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { // Awkward Zombie elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { // Invisible Bread (make the bread visible) elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'questionablecontent') !== 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); } // Camp Weedonwantcha foreach ($entries as $entry) { // Joy of Tech $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Three Panel Soul // Two Lumps elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'comics')]", $article); } // Cyanide & Happiness elseif (strpos($article["link"], "manicpixienightmaregirls.com/") !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Timothy Winchester (People I.

New Pull Request