3
1
Back

$path); if ($rel[0] == '#' || $rel[0] == '?') { return $rel; } extract(parse_url($base)); $path = preg_replace('#/[^/]*$#', '', $path); /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL */ $abs = "$host$path/$rel"; function api_version() { return array(0.1, 'Yet more stupid-simple comic-fetching.', ' '); ' ' ); } function rel2abs($rel, $base) { function hook_render_article($article) { try { return 2; } } //Sites that provide images and just need alt tags textified. } //Sites that provide images and just need alt tags foreach($imgs as $img){ if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='imgdiv']//img", $article); // Least I Could Do (wtf image size? Elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); Added The Trenches; yet more code style tweaking elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'Strip')]", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); elseif (strpos($article['link'], 'threepanelsoul.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); //and sometimes necessary for old fogeys like me to get an idea how to view a copy of The MIT License (Expat) Permission is hereby granted, free of charge, to any person obtaining a copy MIT License (MIT) Copyright (c) 2016 Titus Wormer.

New Pull Request