3
1
Back

Title texts, they're both different, use both. $alt_element = $doc->createElement("i", $title_text); $para_element->appendChild($title_element); } Clean up code formatting; added a few comics; standardized appending alt/title text //also get blog $entries = $xpath->query("//div[@id='signoff-wrapper']"); foreach ($entries as $entry){ $article['content'] .= "

" . $entry->textContent . "

"; } } } // Joy of Tech Scenes From A Multiverse (to get alt tags) elseif (strpos($article['link'], 'wondermark.com/c') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] = $img; } } Invisible Bread, Softer World (alt tags), Dinosaur Comics Cleanup $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); $article['content'] .= "

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

"; } } // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } // Poorly Drawn Lines // Berkeley Mews // $img_tag = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = str_replace('comicsthumbs', 'comics', $article['content']); foreach ($entries as $entry) { $article['content'] .= "
Alt: " . $article['id']; } return $article; } if(ADD_IDS){ $article['content'] .= "

" . $entry->textContent . "

"; } } // CTRL+ALT+DEL elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { // Scenes From A Multiverse (to get alt tags if (preg_match("@.*()@", $article['content'], $matches)) { if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; if (!count($entries)) { $scheme = "https"; From ec09111f772901dd7c3cd7f4b2eb510ce7b1288e Mon Sep 17 00:00:00 2001.

New Pull Request