diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-27 21:20:59 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-27 21:20:59 +0100 |
commit | 575ce629081995766a231f0a9f3e97e3b79d23b1 (patch) | |
tree | 94066e87d5af5b9b1a11012eee11fcaf78bf8c68 | |
parent | [MultiHook] Crypter support (diff) | |
download | pyload-575ce629081995766a231f0a9f3e97e3b79d23b1.tar.xz |
Update MultiHook based hooks
21 files changed, 116 insertions, 134 deletions
diff --git a/module/plugins/hooks/AlldebridCom.py b/module/plugins/hooks/AlldebridCom.py index d5986053f..88a637de7 100644 --- a/module/plugins/hooks/AlldebridCom.py +++ b/module/plugins/hooks/AlldebridCom.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook @@ -10,9 +9,9 @@ class AlldebridCom(MultiHook): __version__ = "0.14" __config__ = [("https", "bool", "Enable HTTPS", False), - ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to stanard download if download fails", False), + ("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to stanard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] __description__ = """Alldebrid.com hook plugin""" @@ -20,8 +19,8 @@ class AlldebridCom(MultiHook): __authors__ = [("Andy Voigt", "spamsales@online.de")] - def getHoster(self): + def getHosters(self): https = "https" if self.getConfig("https") else "http" - page = getURL(https + "://www.alldebrid.com/api.php", get={'action': "get_host"}).replace("\"", "").strip() + page = self.getURL(https + "://www.alldebrid.com/api.php", get={'action': "get_host"}).replace("\"", "").strip() return [x.strip() for x in page.split(",") if x.strip()] diff --git a/module/plugins/hooks/DebridItaliaCom.py b/module/plugins/hooks/DebridItaliaCom.py index e31bc98d7..d18be5384 100644 --- a/module/plugins/hooks/DebridItaliaCom.py +++ b/module/plugins/hooks/DebridItaliaCom.py @@ -2,18 +2,17 @@ import re -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class DebridItaliaCom(MultiHook): __name__ = "DebridItaliaCom" __type__ = "hook" - __version__ = "0.10" + __version__ = "0.11" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to standard download if download fails", False), + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to standard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] __description__ = """Debriditalia.com hook plugin""" @@ -22,5 +21,5 @@ class DebridItaliaCom(MultiHook): ("Walter Purcaro", "vuolter@gmail.com")] - def getHoster(self): - return getURL("http://debriditalia.com/api.php", get={'hosts': ""}).replace('"', '').split(',') + def getHosters(self): + return self.getURL("http://debriditalia.com/api.php", get={'hosts': ""}).replace('"', '').split(',') diff --git a/module/plugins/hooks/EasybytezCom.py b/module/plugins/hooks/EasybytezCom.py index 0dab2a7fe..16149580c 100644 --- a/module/plugins/hooks/EasybytezCom.py +++ b/module/plugins/hooks/EasybytezCom.py @@ -8,17 +8,17 @@ from module.plugins.internal.MultiHook import MultiHook class EasybytezCom(MultiHook): __name__ = "EasybytezCom" __type__ = "hook" - __version__ = "0.04" + __version__ = "0.05" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", "")] + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", "")] __description__ = """EasyBytez.com hook plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - def getHoster(self): + def getHosters(self): self.account = self.core.accountManager.getAccountPlugin(self.__name__) user = self.account.selectAccount()[0] diff --git a/module/plugins/hooks/FastixRu.py b/module/plugins/hooks/FastixRu.py index 73297eb23..a4b423fb7 100644 --- a/module/plugins/hooks/FastixRu.py +++ b/module/plugins/hooks/FastixRu.py @@ -1,17 +1,16 @@ # -*- coding: utf-8 -*- from module.common.json_layer import json_loads -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class FastixRu(MultiHook): __name__ = "FastixRu" __type__ = "hook" - __version__ = "0.03" + __version__ = "0.04" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("unloadFailing", "bool", "Revert to standard download if download fails", False), + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("revertfailed", "bool", "Revert to standard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] __description__ = """Fastix.ru hook plugin""" @@ -19,8 +18,8 @@ class FastixRu(MultiHook): __authors__ = [("Massimo Rosamilia", "max@spiritix.eu")] - def getHoster(self): - page = getURL("http://fastix.ru/api_v2", + def getHosters(self): + page = self.getURL("http://fastix.ru/api_v2", get={'apikey': "5182964c3f8f9a7f0b00000a_kelmFB4n1IrnCDYuIFn2y", 'sub' : "allowed_sources"}) host_list = json_loads(page) diff --git a/module/plugins/hooks/FreeWayMe.py b/module/plugins/hooks/FreeWayMe.py index 0b71fc35b..f2a4f2d34 100644 --- a/module/plugins/hooks/FreeWayMe.py +++ b/module/plugins/hooks/FreeWayMe.py @@ -1,17 +1,16 @@ # -*- coding: utf-8 -*- -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class FreeWayMe(MultiHook): __name__ = "FreeWayMe" __type__ = "hook" - __version__ = "0.12" + __version__ = "0.13" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to stanard download if download fails", False), + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to stanard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] __description__ = """FreeWay.me hook plugin""" @@ -19,7 +18,7 @@ class FreeWayMe(MultiHook): __authors__ = [("Nicolas Giese", "james@free-way.me")] - def getHoster(self): - hostis = getURL("https://www.free-way.me/ajax/jd.php", get={'id': 3}).replace("\"", "").strip() + def getHosters(self): + hostis = self.getURL("https://www.free-way.me/ajax/jd.php", get={'id': 3}).replace("\"", "").strip() self.logDebug("Hosters", hostis) return [x.strip() for x in hostis.split(",") if x.strip()] diff --git a/module/plugins/hooks/LinksnappyCom.py b/module/plugins/hooks/LinksnappyCom.py index 96bf1c0d1..a1c4b90f7 100644 --- a/module/plugins/hooks/LinksnappyCom.py +++ b/module/plugins/hooks/LinksnappyCom.py @@ -1,18 +1,17 @@ # -*- coding: utf-8 -*- from module.common.json_layer import json_loads -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class LinksnappyCom(MultiHook): __name__ = "LinksnappyCom" __type__ = "hook" - __version__ = "0.02" + __version__ = "0.03" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to standard download if download fails", False), + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to standard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] __description__ = """Linksnappy.com hook plugin""" @@ -20,8 +19,8 @@ class LinksnappyCom(MultiHook): __authors__ = [("stickell", "l.stickell@yahoo.it")] - def getHoster(self): - json_data = getURL("http://gen.linksnappy.com/lseAPI.php", get={'act': "FILEHOSTS"}) + def getHosters(self): + json_data = self.getURL("http://gen.linksnappy.com/lseAPI.php", get={'act': "FILEHOSTS"}) json_data = json_loads(json_data) return json_data['return'].keys() diff --git a/module/plugins/hooks/MegaDebridEu.py b/module/plugins/hooks/MegaDebridEu.py index f3a0c31ea..5fb7e1ea6 100644 --- a/module/plugins/hooks/MegaDebridEu.py +++ b/module/plugins/hooks/MegaDebridEu.py @@ -1,24 +1,23 @@ # -*- coding: utf-8 -*- from module.common.json_layer import json_loads -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class MegaDebridEu(MultiHook): __name__ = "MegaDebridEu" __type__ = "hook" - __version__ = "0.03" + __version__ = "0.04" - __config__ = [("unloadFailing", "bool", "Revert to standard download if download fails", False)] + __config__ = [("revertfailed", "bool", "Revert to standard download if download fails", False)] __description__ = """mega-debrid.eu hook plugin""" __license__ = "GPLv3" __authors__ = [("D.Ducatel", "dducatel@je-geek.fr")] - def getHoster(self): - reponse = getURL("http://www.mega-debrid.eu/api.php", get={'action': "getHosters"}) + def getHosters(self): + reponse = self.getURL("http://www.mega-debrid.eu/api.php", get={'action': "getHosters"}) json_data = json_loads(reponse) if json_data['response_code'] == "ok": diff --git a/module/plugins/hooks/MultishareCz.py b/module/plugins/hooks/MultishareCz.py index 5ec5b63b6..2dadf5dc1 100644 --- a/module/plugins/hooks/MultishareCz.py +++ b/module/plugins/hooks/MultishareCz.py @@ -2,17 +2,16 @@ import re -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class MultishareCz(MultiHook): __name__ = "MultishareCz" __type__ = "hook" - __version__ = "0.05" + __version__ = "0.06" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", "uloz.to")] + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", "uloz.to")] __description__ = """MultiShare.cz hook plugin""" __license__ = "GPLv3" @@ -22,6 +21,6 @@ class MultishareCz(MultiHook): HOSTER_PATTERN = r'<img class="logo-shareserveru"[^>]*?alt="([^"]+)"></td>\s*<td class="stav">[^>]*?alt="OK"' - def getHoster(self): - page = getURL("http://www.multishare.cz/monitoring/") + def getHosters(self): + page = self.getURL("http://www.multishare.cz/monitoring/") return re.findall(self.HOSTER_PATTERN, page) diff --git a/module/plugins/hooks/MyfastfileCom.py b/module/plugins/hooks/MyfastfileCom.py index ec7c4e55b..2fda0d3bf 100644 --- a/module/plugins/hooks/MyfastfileCom.py +++ b/module/plugins/hooks/MyfastfileCom.py @@ -1,18 +1,17 @@ # -*- coding: utf-8 -*- from module.common.json_layer import json_loads -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class MyfastfileCom(MultiHook): __name__ = "MyfastfileCom" __type__ = "hook" - __version__ = "0.03" + __version__ = "0.04" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to standard download if download fails", False), + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to standard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] __description__ = """Myfastfile.com hook plugin""" @@ -20,8 +19,8 @@ class MyfastfileCom(MultiHook): __authors__ = [("stickell", "l.stickell@yahoo.it")] - def getHoster(self): - json_data = getURL("http://myfastfile.com/api.php", get={'hosts': ""}, decode=True) + def getHosters(self): + json_data = self.getURL("http://myfastfile.com/api.php", get={'hosts': ""}, decode=True) self.logDebug("JSON data", json_data) json_data = json_loads(json_data) diff --git a/module/plugins/hooks/NoPremiumPl.py b/module/plugins/hooks/NoPremiumPl.py index f60cb3dd6..84a019b8d 100644 --- a/module/plugins/hooks/NoPremiumPl.py +++ b/module/plugins/hooks/NoPremiumPl.py @@ -3,7 +3,7 @@ from module.plugins.internal.MultiHoster import MultiHoster from module.network.RequestFactory import getURL from module.common.json_layer import json_loads as loads - + class NoPremiumPl(MultiHoster): __name__ = "NoPremiumPl" diff --git a/module/plugins/hooks/OverLoadMe.py b/module/plugins/hooks/OverLoadMe.py index 378ce0a65..eb3da319a 100644 --- a/module/plugins/hooks/OverLoadMe.py +++ b/module/plugins/hooks/OverLoadMe.py @@ -1,18 +1,17 @@ # -*- coding: utf-8 -*- -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class OverLoadMe(MultiHook): __name__ = "OverLoadMe" __type__ = "hook" - __version__ = "0.02" + __version__ = "0.03" __config__ = [("https", "bool", "Enable HTTPS", True), - ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to standard download if download fails", False), + ("mode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to standard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 12)] __description__ = """Over-Load.me hook plugin""" @@ -20,9 +19,9 @@ class OverLoadMe(MultiHook): __authors__ = [("marley", "marley@over-load.me")] - def getHoster(self): + def getHosters(self): https = "https" if self.getConfig("https") else "http" - page = getURL(https + "://api.over-load.me/hoster.php", + page = self.getURL(https + "://api.over-load.me/hoster.php", get={'auth': "0001-cb1f24dadb3aa487bda5afd3b76298935329be7700cd7-5329be77-00cf-1ca0135f"}).replace("\"", "").strip() self.logDebug("Hosterlist", page) diff --git a/module/plugins/hooks/PremiumTo.py b/module/plugins/hooks/PremiumTo.py index 3087db552..348bb6789 100644 --- a/module/plugins/hooks/PremiumTo.py +++ b/module/plugins/hooks/PremiumTo.py @@ -1,16 +1,15 @@ # -*- coding: utf-8 -*- -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class PremiumTo(MultiHook): __name__ = "PremiumTo" __type__ = "hook" - __version__ = "0.05" + __version__ = "0.06" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for downloads from supported hosters:", "all"), - ("hosterList", "str", "Hoster list (comma separated)", "")] + __config__ = [("mode", "all;listed;unlisted", "Use for downloads from supported hosters:", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", "")] __description__ = """Premium.to hook plugin""" __license__ = "GPLv3" @@ -19,8 +18,8 @@ class PremiumTo(MultiHook): ("stickell", "l.stickell@yahoo.it")] - def getHoster(self): - page = getURL("http://premium.to/api/hosters.php", + def getHosters(self): + page = self.getURL("http://premium.to/api/hosters.php", get={'username': self.account.username, 'password': self.account.password}) return [x.strip() for x in page.replace("\"", "").split(";")] diff --git a/module/plugins/hooks/PremiumizeMe.py b/module/plugins/hooks/PremiumizeMe.py index b37728e06..e23f13895 100644 --- a/module/plugins/hooks/PremiumizeMe.py +++ b/module/plugins/hooks/PremiumizeMe.py @@ -1,18 +1,17 @@ # -*- coding: utf-8 -*- from module.common.json_layer import json_loads -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class PremiumizeMe(MultiHook): __name__ = "PremiumizeMe" __type__ = "hook" - __version__ = "0.14" + __version__ = "0.15" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to stanard download if download fails", False), + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to stanard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] __description__ = """Premiumize.me hook plugin""" @@ -20,7 +19,7 @@ class PremiumizeMe(MultiHook): __authors__ = [("Florian Franzen", "FlorianFranzen@gmail.com")] - def getHoster(self): + def getHosters(self): # If no accounts are available there will be no hosters available if not self.account or not self.account.canUse(): return [] @@ -30,7 +29,7 @@ class PremiumizeMe(MultiHook): # Get supported hosters list from premiumize.me using the # json API v1 (see https://secure.premiumize.me/?show=api) - answer = getURL("https://api.premiumize.me/pm-api/v1.php", + answer = self.getURL("https://api.premiumize.me/pm-api/v1.php", get={'method': "hosterlist", 'params[login]': user, 'params[pass]': data['password']}) data = json_loads(answer) diff --git a/module/plugins/hooks/RPNetBiz.py b/module/plugins/hooks/RPNetBiz.py index c54f7d445..5af355fcc 100644 --- a/module/plugins/hooks/RPNetBiz.py +++ b/module/plugins/hooks/RPNetBiz.py @@ -1,18 +1,17 @@ # -*- coding: utf-8 -*- from module.common.json_layer import json_loads -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class RPNetBiz(MultiHook): __name__ = "RPNetBiz" __type__ = "hook" - __version__ = "0.11" + __version__ = "0.12" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to stanard download if download fails", False), + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to stanard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] __description__ = """RPNet.biz hook plugin""" @@ -20,7 +19,7 @@ class RPNetBiz(MultiHook): __authors__ = [("Dman", "dmanugm@gmail.com")] - def getHoster(self): + def getHosters(self): # No hosts supported if no account if not self.account or not self.account.canUse(): return [] @@ -28,7 +27,7 @@ class RPNetBiz(MultiHook): # Get account data (user, data) = self.account.selectAccount() - res = getURL("https://premium.rpnet.biz/client_api.php", + res = self.getURL("https://premium.rpnet.biz/client_api.php", get={'username': user, 'password': data['password'], 'action': "showHosterList"}) hoster_list = json_loads(res) diff --git a/module/plugins/hooks/RealdebridCom.py b/module/plugins/hooks/RealdebridCom.py index 066aa52c4..05a6df1dd 100644 --- a/module/plugins/hooks/RealdebridCom.py +++ b/module/plugins/hooks/RealdebridCom.py @@ -1,18 +1,17 @@ # -*- coding: utf-8 -*- -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class RealdebridCom(MultiHook): __name__ = "RealdebridCom" __type__ = "hook" - __version__ = "0.44" + __version__ = "0.45" __config__ = [("https", "bool", "Enable HTTPS", False), - ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to stanard download if download fails", False), + ("mode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to stanard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] __description__ = """Real-Debrid.com hook plugin""" @@ -20,8 +19,8 @@ class RealdebridCom(MultiHook): __authors__ = [("Devirex Hazzard", "naibaf_11@yahoo.de")] - def getHoster(self): + def getHosters(self): https = "https" if self.getConfig("https") else "http" - page = getURL(https + "://real-debrid.com/api/hosters.php").replace("\"", "").strip() + page = self.getURL(https + "://real-debrid.com/api/hosters.php").replace("\"", "").strip() return [x.strip() for x in page.split(",") if x.strip()] diff --git a/module/plugins/hooks/RehostTo.py b/module/plugins/hooks/RehostTo.py index 48afa2342..207449e6a 100644 --- a/module/plugins/hooks/RehostTo.py +++ b/module/plugins/hooks/RehostTo.py @@ -1,17 +1,16 @@ # -*- coding: utf-8 -*- -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class RehostTo(MultiHook): __name__ = "RehostTo" __type__ = "hook" - __version__ = "0.44" + __version__ = "0.45" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to stanard download if download fails", False), + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to stanard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] __description__ = """Rehost.to hook plugin""" @@ -19,8 +18,8 @@ class RehostTo(MultiHook): __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def getHoster(self): - page = getURL("http://rehost.to/api.php", + def getHosters(self): + page = self.getURL("http://rehost.to/api.php", get={'cmd': "get_supported_och_dl", 'long_ses': self.long_ses}) return [x.strip() for x in page.replace("\"", "").split(",")] diff --git a/module/plugins/hooks/SimplyPremiumCom.py b/module/plugins/hooks/SimplyPremiumCom.py index 10a1655c2..5f2d2a42c 100644 --- a/module/plugins/hooks/SimplyPremiumCom.py +++ b/module/plugins/hooks/SimplyPremiumCom.py @@ -1,19 +1,18 @@ # -*- coding: utf-8 -*- from module.common.json_layer import json_loads -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class SimplyPremiumCom(MultiHook): __name__ = "SimplyPremiumCom" __type__ = "hook" - __version__ = "0.03" + __version__ = "0.04" __config__ = [("activated", "bool", "Activated", "False"), - ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to standard download if download fails", "False"), + ("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to standard download if download fails", "False"), ("interval", "int", "Reload interval in hours (0 to disable)", "24")] __description__ = """Simply-Premium.com hook plugin""" @@ -21,8 +20,8 @@ class SimplyPremiumCom(MultiHook): __authors__ = [("EvolutionClip", "evolutionclip@live.de")] - def getHoster(self): - json_data = getURL("http://www.simply-premium.com/api/hosts.php", get={'format': "json", 'online': 1}) + 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']] diff --git a/module/plugins/hooks/SimplydebridCom.py b/module/plugins/hooks/SimplydebridCom.py index 48568f870..13c957294 100644 --- a/module/plugins/hooks/SimplydebridCom.py +++ b/module/plugins/hooks/SimplydebridCom.py @@ -1,22 +1,21 @@ # -*- coding: utf-8 -*- -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class SimplydebridCom(MultiHook): __name__ = "SimplydebridCom" __type__ = "hook" - __version__ = "0.02" + __version__ = "0.03" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", "")] + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", "")] __description__ = """Simply-Debrid.com hook plugin""" __license__ = "GPLv3" __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - def getHoster(self): - page = getURL("http://simply-debrid.com/api.php", get={'list': 1}) + def getHosters(self): + page = self.getURL("http://simply-debrid.com/api.php", get={'list': 1}) return [x.strip() for x in page.rstrip(';').replace("\"", "").split(";")] diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py index 245264d44..e481e8449 100644 --- a/module/plugins/hooks/UnrestrictLi.py +++ b/module/plugins/hooks/UnrestrictLi.py @@ -1,18 +1,17 @@ # -*- coding: utf-8 -*- from module.common.json_layer import json_loads -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class UnrestrictLi(MultiHook): __name__ = "UnrestrictLi" __type__ = "hook" - __version__ = "0.03" + __version__ = "0.04" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to standard download if download fails", False), + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to standard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24), ("history", "bool", "Delete History", False)] @@ -21,8 +20,8 @@ class UnrestrictLi(MultiHook): __authors__ = [("stickell", "l.stickell@yahoo.it")] - def getHoster(self): - json_data = getURL("http://unrestrict.li/api/jdownloader/hosts.php", get={'format': "json"}) + def getHosters(self): + json_data = self.getURL("http://unrestrict.li/api/jdownloader/hosts.php", get={'format': "json"}) json_data = json_loads(json_data) host_list = [element['host'] for element in json_data['result']] diff --git a/module/plugins/hooks/XFileSharingPro.py b/module/plugins/hooks/XFileSharingPro.py index 589143547..79e373ad3 100644 --- a/module/plugins/hooks/XFileSharingPro.py +++ b/module/plugins/hooks/XFileSharingPro.py @@ -28,16 +28,16 @@ class XFileSharingPro(Hook): 'crypter': (r'https?://(?:www\.)?([\w.^_]+(?:\.[a-zA-Z]{2,})(?:\:\d+)?)/(?:user|folder)s?/\w+', r'https?://(?:[^/]+\.)?(%s)/(?:user|folder)s?/\w+')} - HOSTER_LIST = [#WORKING HOSTERS: - "eyesfile.ca", "file4safe.com", "fileband.com", "filedwon.com", "filevice.com", "hostingbulk.com", - "ravishare.com", "salefiles.com", "sharesix.com", "thefile.me", "verzend.be", "xvidstage.com", - #NOT TESTED: - "101shared.com", "4upfiles.com", "filemaze.ws", "filenuke.com", "linkzhost.com", "mightyupload.com", - "rockdizfile.com", "sharebeast.com", "sharerepo.com", "shareswift.com", "uploadbaz.com", "uploadc.com", - "vidbull.com", "zalaa.com", "zomgupload.com", - #NOT WORKING: - "amonshare.com", "banicrazy.info", "boosterking.com", "host4desi.com", "laoupload.com", "rd-fs.com"] - CRYPTER_LIST = [] + HOSTER_BUILTIN = [#WORKING HOSTERS: + "eyesfile.ca", "file4safe.com", "fileband.com", "filedwon.com", "filevice.com", "hostingbulk.com", + "ravishare.com", "salefiles.com", "sharesix.com", "thefile.me", "verzend.be", "xvidstage.com", + #NOT TESTED: + "101shared.com", "4upfiles.com", "filemaze.ws", "filenuke.com", "linkzhost.com", "mightyupload.com", + "rockdizfile.com", "sharebeast.com", "sharerepo.com", "shareswift.com", "uploadbaz.com", "uploadc.com", + "vidbull.com", "zalaa.com", "zomgupload.com", + #NOT WORKING: + "amonshare.com", "banicrazy.info", "boosterking.com", "host4desi.com", "laoupload.com", "rd-fs.com"] + CRYPTER_BUILTIN = [] # def pluginConfigChanged(self.__name__, plugin, name, value): @@ -68,7 +68,7 @@ class XFileSharingPro(Hook): plugin_list = set([x.strip() for x in s.split(',')]) if use_builtin_list: - plugin_list |= set([x.lower() for x in getattr(self, "%s_LIST" % type.upper())]) + plugin_list |= set([x.lower() for x in getattr(self, "%s_BUILTIN" % type.upper())]) plugin_list -= set(('', u'')) diff --git a/module/plugins/hooks/ZeveraCom.py b/module/plugins/hooks/ZeveraCom.py index 6ca696f38..51f759b1c 100644 --- a/module/plugins/hooks/ZeveraCom.py +++ b/module/plugins/hooks/ZeveraCom.py @@ -1,22 +1,21 @@ # -*- coding: utf-8 -*- -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class ZeveraCom(MultiHook): __name__ = "ZeveraCom" __type__ = "hook" - __version__ = "0.03" + __version__ = "0.04" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", "")] + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", "")] __description__ = """Real-Debrid.com hook plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - def getHoster(self): - page = getURL("http://www.zevera.com/jDownloader.ashx", get={'cmd': "gethosters"}) + def getHosters(self): + page = self.getURL("http://www.zevera.com/jDownloader.ashx", get={'cmd': "gethosters"}) return [x.strip() for x in page.replace("\"", "").split(",")] |