3
1
Back

Size e49f4ab127dc081ee1c77dd21e80d128628a1152 b1fcba1e78f37669542b35a3e32a5257c5c0240c 744b72ef7e0d94fccfae99ec3cb3514981ac4616 2d3c489f2acf0f8bdc9cf0fe8c2346d4d07472be c9e81f0cc630cea052574ce7c50b3e82145bb626 4675f71e05fc19d3608ee6e5061bbe79ae432fb7 panel(width); // waves out } // SBMC elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveXML(); } Some comics supported if (strpos($article["link"], "penny-arcade.com") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); // Penny Arcade if(preg_match("@.*()@", $article['content'], $matches)){ $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Least I Could Do (wtf image size? Elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { // Eat That Toast elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'comics')]", $article); // Drugs and Wires elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $article['content'] .= "
ID: " . $article['id']; } return $result_html; } function get_img_tags($xpath, $query, $article, $base_url=NULL) { $img_attributes_whitelist = array('src', 'alt', 'title'); $new_src = $this->rel2abs($orig_src, $article['link']); $entry->setAttribute('src', $new_src); $result_html .= $entry->ownerDocument->saveXML($entry); Added BCN, Something Positive $alt_text = trim($entry->getAttribute('alt')); $alt_text = trim($img->getAttribute('alt')); if (!$alt_text || $alt_text == $article['title'] || strpos($article['title'], $title_text) !== False) { $alt_text = trim($entry->getAttribute('alt')); $alt_text = trim($img->getAttribute('title')); if (!$alt_text) { $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); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Something Positive elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { // And get blog $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { $article['content'] = $img_tag . $article['content']; } drugs & wires, pilotside 2018-11-20 08:29:13 -08:00 // Poorly Drawn Lines elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== 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); elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== 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, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Joy of Tech elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article.

New Pull Request