summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FilecloudIo.py
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-10-08 16:38:43 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-10-08 16:38:43 +0200
commit37251667fed7fcbb77ea55df7ca98f2d5bef1b19 (patch)
tree1bda07aa846b3e2af634758ca58b15e8ef37c2b8 /module/plugins/hoster/FilecloudIo.py
parentSimpleHoster: workaround load cookies 0.4.9 bug (diff)
downloadpyload-37251667fed7fcbb77ea55df7ca98f2d5bef1b19.tar.xz
FilecloudIo: premium support
Diffstat (limited to 'module/plugins/hoster/FilecloudIo.py')
-rw-r--r--module/plugins/hoster/FilecloudIo.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py
index 92735d579..c7684a05d 100644
--- a/module/plugins/hoster/FilecloudIo.py
+++ b/module/plugins/hoster/FilecloudIo.py
@@ -26,9 +26,9 @@ class FilecloudIo(SimpleHoster):
__name__ = "FilecloudIo"
__type__ = "hoster"
__pattern__ = r"http://(?:\w*\.)*(?:filecloud\.io|ifile\.it|mihd\.net)/(?P<ID>\w+).*"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """Filecloud.io (formerly Ifile.it) plugin - free account only"""
- __author_name__ = ("zoidberg")
+ __author_name__ = ("zoidberg", "stickell")
FILE_SIZE_PATTERN = r'{var __ab1 = (?P<S>\d+);}'
FILE_NAME_PATTERN = r'id="aliasSpan">(?P<N>.*?)&nbsp;&nbsp;<'
@@ -109,5 +109,18 @@ class FilecloudIo(SimpleHoster):
else:
self.fail("Unexpected server response")
+ def handlePremium(self):
+ akey = self.account.getAccountData(self.user)['akey']
+ ukey = self.file_info['ID']
+ self.logDebug("Akey: %s | Ukey: %s" % (akey, ukey))
+ rep = self.load("http://api.filecloud.io/api-fetch_download_url.api",
+ post={"akey": akey, "ukey": ukey})
+ self.logDebug("FetchDownloadUrl: " + rep)
+ rep = json_loads(rep)
+ if rep['status'] == 'ok':
+ self.download(rep['download_url'], disposition=True)
+ else:
+ self.fail(rep['message'])
+
getInfo = create_getInfo(FilecloudIo)