diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 08:45:01 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 08:45:01 +0200 |
commit | 04a030f6c5e6703b58825d04071ea7728b485493 (patch) | |
tree | d562aa2d342b76ac65c4260e7814dd3118fb9e09 /module/plugins/hooks/SimplyPremiumComHook.py | |
parent | Default theme is Next (diff) | |
download | pyload-04a030f6c5e6703b58825d04071ea7728b485493.tar.xz |
Prepare hook plugins to merging from stable
Diffstat (limited to 'module/plugins/hooks/SimplyPremiumComHook.py')
-rw-r--r-- | module/plugins/hooks/SimplyPremiumComHook.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/module/plugins/hooks/SimplyPremiumComHook.py b/module/plugins/hooks/SimplyPremiumComHook.py new file mode 100644 index 000000000..9f696666f --- /dev/null +++ b/module/plugins/hooks/SimplyPremiumComHook.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + +from pyload.utils import json_loads +from pyload.plugin.internal.MultiHook import MultiHook + + +class SimplyPremiumCom(MultiHook): + __name__ = "SimplyPremiumCom" + __type__ = "hook" + __version__ = "0.05" + + __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__ = """Simply-Premium.com hook plugin""" + __license__ = "GPLv3" + __authors__ = [("EvolutionClip", "evolutionclip@live.de")] + + + def getHosters(self): + json_data = self.getURL("http://www.simply-premium.com/api/hosts.php", get={'format': "json", 'online': 1}) + json_data = json_loads(json_data) + + host_list = [element['regex'] for element in json_data['result']] + + return host_list |