3
1
Back

Cleanup $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); //also get blog $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } //Sites that provide images and just need alt tags textified. $doc->loadHTML($article['content']); //no-op $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { if (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'Strip')]", $article); // Scenes From A Multiverse (to get alt tags foreach($imgs as $img){ // Questionable Content (cleanup elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { // Gunnerkrigg Court elseif (strpos($article['link'], 'jesusandmo.net') !== FALSE) { elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { // Eat That Toast elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ //also get blog $entries = $xpath->query("//div[@id='signoff-wrapper']"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='imgdiv']//img", $article); // $article['content'] = $img_tag . $article['content']; } .

New Pull Request