3
1
Back

2.992121,8.8569411 H 2.913381" It's really just a borked RSS feed elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//a//img", $article); elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { // Dilbert elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { // Wondermark (alt tag already present) elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } /* dirty absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL is ready! */ } function get_img_tags($xpath, $query, $article){ $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); } // SatW elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='imgdiv']//img", $article); //also get the blog $article['content'] = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); } // Breaking Cat News elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $aftercomic = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); $article['content'] .= "
Alt: " . $article['id']; } function rel2abs($rel, $base) { $rel = trim($rel); if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $rel; } if ($rel[0] == '#' || $rel[0] == '?') { return $this->mangle_article($article); } function get_img_tags($xpath, $query, $article, $base_url=NULL) { $img_attributes_whitelist = array('src', 'alt', 'title'); $new_src = $this->rel2abs($orig_src, $article['link']); if ($alt_text && !$title_text){ Various updates, additions Fix for when invisiblebread has no bread 2016-05-21 17:02:21 -07:00 elseif (strpos($article["content"], "//www.vgcats.com/comics/?strip_id=") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); } // Least I Could Do (wtf image size? Elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { if (!$title_text.

New Pull Request