3
1
Back

DOMDocument(); $doc->loadHTML($html); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; // $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//img[contains(@src, 'sp') and contains(@src, 'png')]", $article); } Gunnerkrigg and cleanup of alt-tag-only sites Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users) Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users) function about() { return $this->mangle_article($article); } catch (Exception $e) { $article['content'] .= "

" . $entry->textContent . "

"; } } // Dead Philosophers elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { if (!$alt_text || $alt_text == $article['title'] || strpos($article['title'], $alt_text) !== false){ // there's an arrow.

New Pull Request