3
1
Back

Here. * Most important: Keep it simple. Follow one pattern. Class _comics extends Plugin { function get_img_tags($xpath, $query, $article) { $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { // Alice Grove (get bigger image) elseif (strpos($article['link'], 'https://web3isgoinggreat.com/single/') !== FALSE) { // Chainsawsuit // Chainsawsuit // Poorly Drawn Lines elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { // Penny Arcade elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { // Wondermark (alt tag already present) // Wondermark (alt tag already present) elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ //also get blog $entries = $xpath->query("//div[@id='signoff-wrapper']"); } //Sites that provide images and just need alt tags textified. Elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } Added BCN, Something Positive } if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveXML(); // Questionable Content.

New Pull Request