diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-13 15:56:57 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-13 15:56:57 +0100 |
commit | acc46fc3497a66a427b795b4a22c6e71d69185a1 (patch) | |
tree | 2d315b838a76435fc456b972c99c28d1732b2f70 /pyload/plugin/hook/EasybytezCom.py | |
parent | Code fixes (diff) | |
download | pyload-acc46fc3497a66a427b795b4a22c6e71d69185a1.tar.xz |
Update
Diffstat (limited to 'pyload/plugin/hook/EasybytezCom.py')
-rw-r--r-- | pyload/plugin/hook/EasybytezCom.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pyload/plugin/hook/EasybytezCom.py b/pyload/plugin/hook/EasybytezCom.py new file mode 100644 index 000000000..b401809fb --- /dev/null +++ b/pyload/plugin/hook/EasybytezCom.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- + +import re + +from pyload.plugin.internal.MultiHoster import MultiHoster + + +class EasybytezCom(MultiHoster): + __name = "EasybytezCom" + __type = "hook" + __version = "0.03" + + __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("hosterList", "str", "Hoster list (comma separated)", "")] + + __description = """EasyBytez.com hook plugin""" + __license = "GPLv3" + __authors = [("zoidberg", "zoidberg@mujmail.cz")] + + + def getHoster(self): + self.account = self.core.accountManager.getAccountPlugin(self.__name) + user = self.account.selectAccount()[0] + + try: + req = self.account.getAccountRequest(user) + page = req.load("http://www.easybytez.com") + + hosters = re.search(r'</textarea>\s*Supported sites:(.*)', page).group(1).split(',') + + except Exception, e: + self.logWarning(_("Unable to load supported hoster list, using last known")) + self.logDebug(e) + + hosters = ["bitshare.com", "crocko.com", "ddlstorage.com", "depositfiles.com", "extabit.com", "hotfile.com", + "mediafire.com", "netload.in", "rapidgator.net", "rapidshare.com", "uploading.com", "uload.to", + "uploaded.to"] + finally: + return hosters |