Labels Milestones
Back(strpos($article["link"], "penny-arcade.com") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'ENG_')]", $article); } // SatW // SatW elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] .= "
" . $entry->textContent . "
"; $article['content'] .= "" . $entry->textContent . "
"; } } // Dilbert // Dilbert // Dilbert elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); // Penny Arcade elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = new DOMXPath($doc); } function get_img_tags($xpath, $query, $article){ $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry){ foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); } // there's both alt and title texts, they're both different, use both. $title_element = $doc->createElement("i", $alt_text); } elseif (strpos($alt_text, $title_text) !== False) { $alt_text = trim($img->getAttribute('alt')); if (!$alt_text || $alt_text == $article['title'] || strpos($article['title'], $alt_text) !== false){ // there's an arrow shaped. New Pull Request