diff options
author | jansohn <jansohn@users.noreply.github.com> | 2015-10-02 10:09:26 +0200 |
---|---|---|
committer | jansohn <jansohn@users.noreply.github.com> | 2015-10-02 10:09:26 +0200 |
commit | 3a08656c5665f4b8db98744fb323e64b8630e084 (patch) | |
tree | 28f9f62ffc57888b76ca32540dbf5af3a4cfc8d0 /module/plugins/hoster/UserscloudCom.py | |
parent | Merge pull request #1 from pyload/stable (diff) | |
parent | [Account] Improve parse_traffic method + code cosmetics (diff) | |
download | pyload-3a08656c5665f4b8db98744fb323e64b8630e084.tar.xz |
Merge pull request #2 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/hoster/UserscloudCom.py')
-rw-r--r-- | module/plugins/hoster/UserscloudCom.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/module/plugins/hoster/UserscloudCom.py b/module/plugins/hoster/UserscloudCom.py new file mode 100644 index 000000000..ebaed4859 --- /dev/null +++ b/module/plugins/hoster/UserscloudCom.py @@ -0,0 +1,37 @@ +# -*- 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): + self.download(pyfile.url, + post=dict(re.findall(r'<input type="hidden" name="(.+?)" value="(.*?)">', self.html))) + + +getInfo = create_getInfo(UserscloudCom) |