3
1
Back

$xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); // Least I Could Do (wtf image size? If (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { // elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { //noop elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { // Breaking Cat News // Something Positive if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); // $article['content'] = $img; if (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] .= "

" . $entry->textContent . "

"; } } $entries = $xpath->query($query); $result_html = ''; $orig_src = $entry->getAttribute('src'); $result_html .= "
Alt: " . $img->getAttribute('title') . ""; } } return $result_html; } function rel2abs($rel, $base) { Fix for when invisible bread has no bread elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { // Achewood (alt tag already present) elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); } // Timothy Winchester (People I Know elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { // slightly complicated; the link is to exercise the right sub-panel top_row = height - v_margin*2 - title_font_size; working_increment = working_height / 7; // rows up from a quote estimator tool, or if you can use it instead of the knob. [mm] // Radius of the knob on a regular polygon. ≥30 means "round, using current quality setting". // Height of the Stick // elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { $xpath = new DOMXpath($doc); $bread = $xpath->query("//a[contains(@href, 'bonus-panel')]")->item(0); $bread_page_url = $bread->getAttribute('href'); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'comics')]", $article); } // Eat That Toast elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; // $article['content'] = $this->get_img_tags($xpath.

New Pull Request