3
1
Back

$url_xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); // $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] .= "

" . $entry->textContent . "

"; } } function rel2abs($rel, $base) { if (!$alt_text || strpos($article['title'], $alt_text) !== False) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $article['content'] .= "

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

"; } } // Scenes From A Multiverse (to get alt tags elseif (strpos($article['link'], 'https://web3isgoinggreat.com/single/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; $img = preg_replace("@width=\"\d+\"@", "", $img); $img = $matches[1]; } } $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry){ $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } } } if(ADD_IDS){ $article['content'] .= "

" . $entry->textContent . "

"; } } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'www.robot-hugs.com/') !== FALSE) { elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { // Scenes From A Multiverse (to get alt tags elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== 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($query); $result_html = ''; function get_xpath_dealie($link) .

New Pull Request