summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/hook/NoPremiumPl.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugin/hook/NoPremiumPl.py')
-rw-r--r--pyload/plugin/hook/NoPremiumPl.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/pyload/plugin/hook/NoPremiumPl.py b/pyload/plugin/hook/NoPremiumPl.py
new file mode 100644
index 000000000..05bd6c0ba
--- /dev/null
+++ b/pyload/plugin/hook/NoPremiumPl.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+
+from pyload.utils import json_loads
+from pyload.plugin.internal.MultiHook import MultiHook
+
+
+class NoPremiumPl(MultiHook):
+ __name = "NoPremiumPl"
+ __type = "hook"
+ __version = "0.03"
+
+ __config = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
+ ("pluginlist" , "str" , "Plugin list (comma separated)" , "" ),
+ ("revertfailed" , "bool" , "Revert to standard download if fails", True ),
+ ("reload" , "bool" , "Reload plugin list" , True ),
+ ("reloadinterval", "int" , "Reload interval in hours" , 12 )]
+
+ __description = """NoPremium.pl hook plugin"""
+ __license = "GPLv3"
+ __authors = [("goddie", "dev@nopremium.pl")]
+
+
+ def getHosters(self):
+ hostings = json_loads(self.getURL("https://www.nopremium.pl/clipboard.php?json=3").strip())
+ hostings_domains = [domain for row in hostings for domain in row["domains"] if row["sdownload"] == "0"]
+
+ self.logDebug(hostings_domains)
+
+ return hostings_domains