3
1
Back

A kind of referer check which prevents fetch_file_contents() from retrieving the image. /* OotS uses some kind of referer check which prevents fetch_file_contents() from retrieving the image. // $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { // Dead Philosophers // Dead Philosophers elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/noscript/img", $article); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] .= "

" . $entry->ownerDocument->saveXML($entry) . "

"; } } //Sites that provide images and just need alt tags textified. } $article = $this->alt_textify($article); $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry){ $article['content'] .= "" . $entry->textContent . "

"; $article['content'] .= "

" . $entry->textContent . "

"; } } // Poly In Pictures } // Drugs and Wires elseif (strpos($article["link"], "www.pilotside.us/comic/") !== FALSE) { //noop elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveHTML(); function get_img_tags($xpath, $query, $article){ $new_src = $this->rel2abs($orig_src, $base_url); foreach($attributes as $attrib_name => $node){ } function get_img_tags($xpath, $query, $article){ $entries = $xpath->query($query); $result_html = ''; function rel2abs($rel, $base) { if (strpos($article["content"], "bonus panel!") !== FALSE) { elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // Three Panel Soul elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { if (parse_url($rel, PHP_URL_SCHEME) != '' .

New Pull Request