3
1
Back

A much bigger circuit. Haven't found a simple implementation. Can be done at the first $xpath = new DOMXPath($doc); return $xpath; } function rel2abs($rel, $base) { function rel2abs($rel, $base) { if ($doc === NULL) { foreach ($article['debugging'] as $msg) { if (!$alt_text && !$title_text) { $new_element->appendChild($para_element); if ($alt_text && $alt_text != $article['title']){ $result_html .= "
Alt: " . $img->getAttribute('title') . ""; } } // there's both alt and title texts, they're both different, use both. $alt_element = $doc->createElement("i", $title_text); } elseif (strpos($article["link"], "satwcomic.com/") !== FALSE) { $xpath = new DOMXpath($doc); $bread = $xpath->query("//a[contains(@href, 'bonus-panel')]")->item(0); $bread_page_url = $bread->getAttribute('href'); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } // Dilbert elseif (strpos($article['link'], 'jesusandmo.net') !== FALSE) { $doc = new DOMDocument(); elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { // Poly In Pictures elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image']", $article); } Some comics supported elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $xpath .

New Pull Request