diff options
author | GammaC0de <GammaC0de@users.noreply.github.com> | 2015-09-12 23:49:51 +0200 |
---|---|---|
committer | GammaC0de <GammaC0de@users.noreply.github.com> | 2015-09-12 23:49:51 +0200 |
commit | a313e7b525178204eef9dd2cf7ad91f5299d6be2 (patch) | |
tree | 23df615f74f3581aed6215c1dfd84029d6f3ac77 /module/plugins/hoster/UserscloudCom.py | |
parent | Merge pull request #1815 from rlindner81/fix/Go4UpCom (diff) | |
download | pyload-a313e7b525178204eef9dd2cf7ad91f5299d6be2.tar.xz |
New Hoster - UserscloudCom
Diffstat (limited to 'module/plugins/hoster/UserscloudCom.py')
-rw-r--r-- | module/plugins/hoster/UserscloudCom.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/module/plugins/hoster/UserscloudCom.py b/module/plugins/hoster/UserscloudCom.py new file mode 100644 index 000000000..6791a6068 --- /dev/null +++ b/module/plugins/hoster/UserscloudCom.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- + +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class UserscloudCom(SimpleHoster): + __name__ = "UserscloudCom" + __type__ = "hoster" + __version__ = "0.01" + __status__ = "testing" + + __pattern__ = r'https?://(?:www\.)?userscloud\.com/\w{12}' + + __description__ = """userscloud.com hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("GammaC0de", None)] + + + NAME_PATTERN = r'<h2 class="strong margin-none">(?P<N>.+?)<' + SIZE_PATTERN = r'<div class="ribbon">(?P<S>[\d.,]+) (?P<U>[\w^_]+)<' + OFFLINE_PATTERN = r'The file you are trying to download is no longer available' + + + def setup(self): + self.multiDL = True + self.resume_download = False + self.chunk_limit = 1 + + def handle_free(self, pyfile): + post_data=dict(re.findall(r'<input type="hidden" name="(.+?)" value="(.*?)">', self.html)) + + self.download(pyfile.url, post=post_data) + +getInfo = create_getInfo(UserscloudCom) |