3
1
Back

Textified. $doc->loadHTML($article['content']); //no-op $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, '(//div[@class="container"]//center//img)', $article); } // Dilbert elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { // Alice Grove (get bigger image) elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//a//img", $article); elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); // Doghouse Diaries, which has broken alt tags elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { $article['content'] = $img_tag . $article['content']; } // XKCD (alt tags we don't need to call out for foreach ($imgs as $img) { if ($img->getAttribute('title')) { // Three Panel Soul * Scenes From A Multiverse (to get alt tags textified. //Sites that provide images and just need alt tags if both exist achewood, gwss fix, fix for when invisible bread has no bread elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; if (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Wondermark (alt tag already present foreach($imgs as $img){ if ($img->getAttribute('title.

New Pull Request