3
1
Back

0.393701" d="M 2.9527563,1.5748029 V 1.181102" d="m -0.44985651,6.0200689 -1.06879179,0 -0.5343958,-0.9256008 0.5343959,-0.9256008 1.06879179,0 0.53439582,0.9256009 z" d="m -12.693837,3.4536024 v 0.281728" d="m 2.9527508,8.8188983 v 0.07874" d="m -2.5196841,2.5590618 h -0.07874" d="M -4.4488226,2.4606366 V 2.6574871" d="m -4.3503976,2.5590618 h -0.19685" d="M -3.5433071,7.381896 V 7.5787465" d="m -3.4448821,7.4803212 h -0.19685" d="M 3.4251924,8.759842 V 8.9566925" d="m 3.5236174,8.8582672 h -0.19685" d="M -3.5433109,9.54725 V 9.744101" d="m -6.7913422,9.645676 h -0.19685" d="M -3.5433109,9.54725 V 9.744101" d="m -3.4448859,9.645676 h -0.19685" d="M -6.8897634,7.381896 V 7.5787465" d="m -3.4448821,7.4803212 h -0.19685" d="m -3.5433111,11.318904 v 0.196852" d="m 3.5236219,3.1496062 h -0.19685" d="M -3.5433071,7.381896 V 7.5787465" d="m -6.7913384,7.4803212 h -0.19685" d="M 2.4803098,7.7755925 V 7.972443" d="m 2.5787348,7.8740177 h -0.19685" d="M 2.4803057,4.4291344 V 4.6259849" d="m 2.5787307,4.5275596 h -0.19685" d="m 3.4251925,7.1850396 v 0.196852" d="m 3.5236169,5.9055122 h -0.19685" d="m 2.9527508,8.8202247 v 0.07874" d="m -4.6850386,1.1811083 h -0.07874" d="m -0.59055042,2.521019 v 0.07874" d="M 2.992121,8.8569411 H 2.913381" It's really just a quick and dirty content rewriting engine with code already written for about a dozen webcomics. Examples: Joy of Tech elseif (strpos($article['link'], 'paintraincomic.com/comic/') !== FALSE) { } //Sites that provide images and just need alt tags textified. Elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // SBMC elseif (strpos($article["link"], "sorcery101.net/the-city-between/thebettertofindyouwith") !== FALSE) { // PhD Unknown elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'png')]", $article); } // Awkward Zombie elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='comic']", $article); //also get the blog $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); $alt_text = trim($entry->getAttribute('title')); $result_html .= "
Alt: " . $article['id']; } return $result_html; } function get_img_tags($xpath, $query, $article){ /* dirty absolute URL is ready! */ return $scheme.'://'.$abs; } /* absolute URL */ $abs = "$host$path/$rel"; function api_version() { $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } /* OotS uses some kind of referer check which prevents fetch_file_contents() from retrieving the image. // Order of the top if you don't want the ring.

New Pull Request