summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/af_comics/filters/af_comics_comicpress.php3
-rw-r--r--plugins/af_comics/filters/af_comics_danbydraws.php27
2 files changed, 28 insertions, 2 deletions
diff --git a/plugins/af_comics/filters/af_comics_comicpress.php b/plugins/af_comics/filters/af_comics_comicpress.php
index 915c09641..f62d4889c 100755
--- a/plugins/af_comics/filters/af_comics_comicpress.php
+++ b/plugins/af_comics/filters/af_comics_comicpress.php
@@ -4,14 +4,13 @@ class Af_Comics_ComicPress extends Af_ComicFilter {
function supported() {
return array("Buni", "Buttersafe", "Happy Jar", "CSection",
"Extra Fabulous Comics", "Nedroid", "Stonetoss",
- "Danby Draws", "Powerup Comics");
+ "Powerup Comics");
}
function process(&$article) {
if (str_contains($article["guid"], "bunicomic.com") ||
str_contains($article["guid"], "buttersafe.com") ||
str_contains($article["guid"], "extrafabulouscomics.com") ||
- str_contains($article["guid"], "danbydraws.com") ||
str_contains($article["guid"], "theduckwebcomics.com/Powerup_Comics") ||
str_contains($article["guid"], "happyjar.com") ||
str_contains($article["guid"], "nedroid.com") ||
diff --git a/plugins/af_comics/filters/af_comics_danbydraws.php b/plugins/af_comics/filters/af_comics_danbydraws.php
new file mode 100644
index 000000000..3ecc93180
--- /dev/null
+++ b/plugins/af_comics/filters/af_comics_danbydraws.php
@@ -0,0 +1,27 @@
+<?php
+class Af_Comics_DanbyDraws extends Af_ComicFilter {
+
+ function supported() {
+ return array("Danby Draws");
+ }
+
+ function process(&$article) {
+ if (str_contains($article["link"], "danbydraws.com")) {
+ $res = UrlHelper::fetch(["url" => $article["link"]]);
+
+ $doc = new DOMDocument();
+
+ if ($res && $doc->loadHTML($res)) {
+ $xpath = new DOMXPath($doc);
+ $basenode = $xpath->query('//div[@id="comic"]|//img[contains(@class, "wp-post-image")]/..')->item(0);
+
+ if ($basenode) {
+ $article["content"] = $doc->saveHTML($basenode);
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+}