3
1
Back

From ec89d624dcbabc43243d2dcb7078e4434becb7c8 Mon Sep 17 00:00:00 2001 Subject: [PATCH] More cleanup c5e8dbdd1f5bb4b2a027556e63f3cebc1db3a56a More cleanup c5e8dbdd1f5bb4b2a027556e63f3cebc1db3a56a More cleanup // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); } function get_img_tags($xpath, $query, $article) { $entries = $xpath->query("//span[@class='rss-content']"); // Wondermark (alt tag already present elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[contains(@src, 'sp') and contains(@src, 'png')]", $article); } // Chainsawsuit elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); // Dinosaur Comics (alt tags+blog), CAD, attempt at OOTS (but that one fails due to referer checks) Invisible Bread, Softer World (alt tags we don't need to call out for elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { elseif (strpos($article['link'], 'http://www.geekculture.com/joyoftech/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // XKCD (alt tags we don't need to call out for if(preg_match("@.*()@", $article['content'], $matches)){ if (preg_match("@.*(

New Pull Request