summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks
diff options
context:
space:
mode:
authorGravatar synweap15 <shamdog+github@gmail.com> 2014-07-08 20:00:23 +0200
committerGravatar synweap15 <shamdog+github@gmail.com> 2014-07-08 20:00:23 +0200
commit7a7e3e211e36af06d00e0effbcc37ac59e152427 (patch)
tree4464a5720e6664cb8c8f18077df989e53710ca01 /module/plugins/hooks
parent[Oboom] new hoster and account (diff)
downloadpyload-7a7e3e211e36af06d00e0effbcc37ac59e152427.tar.xz
nopremium.pl files added
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r--module/plugins/hooks/NoPremiumPl.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/module/plugins/hooks/NoPremiumPl.py b/module/plugins/hooks/NoPremiumPl.py
new file mode 100644
index 000000000..154d748f1
--- /dev/null
+++ b/module/plugins/hooks/NoPremiumPl.py
@@ -0,0 +1,39 @@
+# !/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+@author: Pawel W. <dev@nopremium.pl>
+"""
+
+from module.plugins.internal.MultiHoster import MultiHoster
+from module.network.RequestFactory import getURL
+
+try:
+ from json import loads
+except ImportError:
+ from simplejson import loads
+
+class NoPremiumPl(MultiHoster):
+ __name__ = "NoPremiumPl"
+ __version__ = "0.01"
+ __type__ = "hook"
+
+ __config__ = [("activated", "bool", "Activated", "False"),
+ ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"),
+ ("hosterList", "str", "Hoster list (comma separated)", ""),
+ ("unloadFailing", "bool", "Try standard download if download fails", "False"),
+ ("interval", "int", "Reload supported hosts interval in hours (0 to disable)", "24")]
+
+ __description__ = "NoPremium.pl hook"
+ __author_name__ = ("goddie")
+ __author_mail__ = ("dev@nopremium.pl")
+
+ def getHoster(self):
+
+ hostings = loads(getURL("https://www.nopremium.pl/clipboard.php?json=3").strip())
+ return [domain for row in hostings for domain in row["domains"] if row["sdownload"] == "0"]
+
+ def getHosterCached(self):
+ return self.getHoster()
+
+