diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-27 14:37:29 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-27 14:37:29 +0100 |
commit | fd8d1bd2b86db4be1c9b7200a50982f80c0c5e58 (patch) | |
tree | df95fad760db41a2618db3aafe32b72e39983c85 /module/plugins/hooks | |
parent | [ShareonlineBiz] Fix account wrong password recognition (diff) | |
parent | New __authors__ key, added __license__ (diff) | |
download | pyload-fd8d1bd2b86db4be1c9b7200a50982f80c0c5e58.tar.xz |
Merge pull request #682 from synweap15/rapideo
MultihosterRapideo.pl
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r-- | module/plugins/hooks/RapideoPl.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/module/plugins/hooks/RapideoPl.py b/module/plugins/hooks/RapideoPl.py new file mode 100644 index 000000000..a5d7a34a5 --- /dev/null +++ b/module/plugins/hooks/RapideoPl.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- + +from module.plugins.internal.MultiHoster import MultiHoster +from module.network.RequestFactory import getURL +from module.common.json_layer import json_loads as loads + + +class RapideoPl(MultiHoster): + __name__ = "RapideoPl" + __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__ = "Rapideo.pl hook" + __license__ = "GPLv3" + __authors__ = [("goddie", "dev@rapideo.pl")] + + def getHoster(self): + hostings = loads(getURL("https://www.rapideo.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() + + |