3
1
Back

= [right_col, row_2, 0]; } // Dead Philosophers Dead Philosophers 2015-02-25 15:05:54 -08:00 // Poorly Drawn Lines // Berkeley Mews // elseif (strpos($article["link"], "sorcery101.net/the-city-between/thebettertofindyouwith") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); // only keep everything starting at the first if (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'comics')]", $article); } // SBMC elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { // PhD Unknown elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Joy of Tech elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicbody"]//img)', $article) . $article['content']; elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); // And get blog entry $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry){ $article['content'] .= "
Alt: $alt_text
"; } } } return $article; } function get_img_tags($xpath, $query, $article, $base_url=NULL) { function rel2abs($rel, $base) { function api_version() { return $this->mangle_article($article); } function rel2abs($rel, $base) { if ($rel[0]=='#' || $rel[0]=='?') { return $this->mangle_article($article); } catch (Exception $e) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); elseif (strpos($article["link"], "sorcery101.net/the-city-between/thebettertofindyouwith") !== FALSE) { // $img_tag = $this->get_img_tags($xpath, "//div[@class='timeline-description']", $article); } // Dilbert.

New Pull Request