3
1
Back

When invisible bread has no bread Fix for when invisible bread has no bread $article['content'] = $doc->saveXML(); // Questionable Content (cleanup // only keep everything starting at the first $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } } // Two Lumps elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { } /* absolute URL is ready! */ } /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } else { return $this->mangle_article($article); } catch (Exception $e) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="main"]//img)', $article); } // Breaking Cat News elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { // Eat That Toast bog-standard example if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { Gunnerkrigg and cleanup of alt-tag-only sites elseif (strpos($article['link'], '//theoatmeal.com/comics/') !== FALSE) { $doc = new DOMDocument(); // replace the

(containing project wonderful) with nothing $article['content'] = $img; } } // Drugs and Wires elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $aftercomic = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'uploads')]", $article); } // Poly In Pictures // Poly In Pictures // Poly In Pictures elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); Added The Trenches; yet more code style tweaking Gunnerkrigg and cleanup of alt-tag-only sites elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'png')]", $article); elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { // Three Panel Soul elseif (strpos($article['link'], 'threepanelsoul.com/comic/') !== FALSE) { elseif (strpos($article['link.

New Pull Request