3
1
Back

"//div//img[contains(@src, 'images') and contains(@src, 'uploads') and contains(@src, 'png')]", $article); } /* replace '//' or '/./' or '/foo/../' with '/' */ } function get_img_tags($xpath, $query, &$article, $base_url=NULL) { function api_version() { return $this->mangle_article($article); } function rel2abs($rel, $base) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $base . $rel; } if ($rel[0]=='#' || $rel[0]=='?') { $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '/') { } /* absolute URL is ready! */ elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); } // Least I Could Do (wtf image size?) // Least I Could Do (wtf image size? If(preg_match("@.*()@", $article['content'], $matches)){ $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@width=\"\d+\"@", "", $img.

New Pull Request