summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/EasybytezCom.py
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-09-24 23:54:50 +0200
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-09-24 23:54:50 +0200
commitb65c4091d5c5e793d8a9df17a46657d45c3a1292 (patch)
tree40a420e5213d28634b75408059a2dc3687e461d1 /module/plugins/hooks/EasybytezCom.py
parentupdate hellshare/hellspy patterns (diff)
downloadpyload-b65c4091d5c5e793d8a9df17a46657d45c3a1292.tar.xz
multihosters - closed #618, store http/ftp accounts, add uptobox.com premium
Diffstat (limited to 'module/plugins/hooks/EasybytezCom.py')
-rw-r--r--module/plugins/hooks/EasybytezCom.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/module/plugins/hooks/EasybytezCom.py b/module/plugins/hooks/EasybytezCom.py
index 21a988555..22b9050b4 100644
--- a/module/plugins/hooks/EasybytezCom.py
+++ b/module/plugins/hooks/EasybytezCom.py
@@ -11,7 +11,7 @@ def getConfigSet(option):
class EasybytezCom(MultiHoster):
__name__ = "EasybytezCom"
- __version__ = "0.02"
+ __version__ = "0.03"
__type__ = "hook"
__config__ = [("activated", "bool", "Activated", "False"),
("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
@@ -21,16 +21,16 @@ class EasybytezCom(MultiHoster):
__author_mail__ = ("zoidberg@mujmail.cz")
def getHoster(self):
-
- hoster = set(['2shared.com', 'easy-share.com', 'filefactory.com', 'fileserve.com', 'filesonic.com', 'hotfile.com', 'mediafire.com', 'megaupload.com', 'netload.in', 'rapidshare.com', 'uploading.com', 'wupload.com', 'oron.com', 'uploadstation.com', 'ul.to', 'uploaded.to'])
+ self.account = self.core.accountManager.getAccountPlugin(self.__name__)
+ user = self.account.selectAccount()[0]
- configMode = self.getConfig('hosterListMode')
- if configMode in ("listed", "unlisted"):
- configList = set(self.getConfig('hosterList').strip().lower().replace('|',',').replace(';',',').split(','))
- configList.discard(u'')
- if configMode == "listed":
- hoster &= configList
- else:
- hoster -= configList
+ try:
+ req = self.account.getAccountRequest(user)
+ page = req.load("http://www.easybytez.com")
- return list(hoster) \ No newline at end of file
+ found = re.search(r'</textarea>\s*Supported sites:(.*)', page)
+ return found.group(1).split(',')
+ except Exception, e:
+ self.logDebug(e)
+ self.logWarning("Unable to load supported hoster list, using last known")
+ return ['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'] \ No newline at end of file