3
1
Back

// Manic Pixie Nightmare Girls elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE ) { $img_tag = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveXML(); } // XKCD (alt tags we don't need to call out for if(preg_match("@.*()@", $article['content'], $matches)){ if (preg_match("@.*()@", $article['content'], $matches)) { if ($img->getAttribute('title')) { // only keep everything starting at the first if(preg_match("@.*()@", $article['content'], $matches)){ function get_img_tags($xpath, $query, $article) { function get_img_tags($xpath, $query, &$article, $base_url=NULL) { /* absolute URL is ready! */ } /* absolute URL is ready! */ elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; } // XKCD (alt tags we don't need to call out for elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { //noop elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); } // Pain Train (to get alt tag) elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { // Eat That Toast bog-standard example.

New Pull Request