3
1
Back

{ $new_element->appendChild($para_element); if ($alt_text && $alt_text != $article['title']){ $result_html .= "
Alt: " . $article['id']; $article = $this->alt_textify($article); $entries = $xpath->query("//div[@id='comic-notes']"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//img[@class='comic']", $article); //also get blog $entries = $xpath->query("//div[@class='entry']"); if (preg_match("@.*(.*)@", $article['content'], $matches)) { $article['content'] .= "Bonus comic:" . $aftercomic . "

"; } } } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); //also get blog $entries = $xpath->query("//div[@id='signoff-wrapper']"); foreach ($entries as $entry){ $article['content'] .= "
ID: " . $article['id']; } return $article; } if(ADD_IDS){ $article['content'] .= "

" . $entry->textContent . "

"; } } } // SatW elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE ) { // Scenes From A Multiverse (to get alt tags) } // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Joy of Tech elseif (strpos($article['link'], 'https://web3isgoinggreat.com/single/') !== FALSE) { //also get the blog //also get the blog $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] .= "" . $msg . ""; // Softer World (alt tags), Dinosaur.

New Pull Request