3
1
Back

Images and just need alt tags textified. Elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("img"); $new_element->setAttribute('src', $extraimage->getAttribute('src')); $bread->parentNode->replaceChild($new_element, $bread); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Poorly Drawn Lines elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']", $article); //Sites that provide images and just need alt tags if both exist achewood, gwss fix, fix for when invisible bread has no bread Pain Train alt tag, Alice Grove (get bigger image elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { //also get the blog $entries = $xpath->query("//div[@id='signoff-wrapper']"); } //Sites that provide images and just need alt tags textified. Elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveXML(); // Questionable Content (cleanup) elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); // Penny Arcade if (strpos($article['link'], 'eatthattoast.com/comic/') !== 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'] = $img_tag . $article['content']; elseif (strpos($article["link"], "satwcomic.com/") !== FALSE) { elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { //also append the blarg post because that's small, interesting, $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] .= "
Alt: " . $article['id']; } return $article; } Some comics supported elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); .

New Pull Request