diff options
author | z00nx 0 <z00nx0@gmail.com> | 2013-10-07 15:22:52 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-10-07 15:22:52 +0200 |
commit | 2a7f6327bb9b6463ef316d2c0d64ba841ae6f0f5 (patch) | |
tree | 91bf2461c11acba08e6e278513992e4f44be9c5f /module/plugins/hoster/RgHostNet.py | |
parent | Captcha9kw: new selfsolve option (diff) | |
download | pyload-2a7f6327bb9b6463ef316d2c0d64ba841ae6f0f5.tar.xz |
New hoster: RgHostNet
Requested in #176
Diffstat (limited to 'module/plugins/hoster/RgHostNet.py')
-rw-r--r-- | module/plugins/hoster/RgHostNet.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py new file mode 100644 index 000000000..a46b51733 --- /dev/null +++ b/module/plugins/hoster/RgHostNet.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class RgHostNet(SimpleHoster): + __name__ = "RgHostNet" + __type__ = "hoster" + __pattern__ = r"http://(?:www\.)?rghost\.net/\d+(?:r=\d+)?" + __version__ = "0.01" + __description__ = """RgHost.net Download Hoster""" + __author_name__ = ("z00nx") + __author_mail__ = ("z00nx0@gmail.com") + + FILE_INFO_PATTERN = r'<h1>\s+(<a[^>]+>)?(?P<N>[^<]+)(</a>)?\s+<small[^>]+>\s+\((?P<S>[^)]+)\)\s+</small>\s+</h1>' + FILE_OFFLINE_PATTERN = r'File is deleted|this page is not found' + DOWNLOAD_LINK_PATTERN = '''<a\s+href="([^"]+)"\s+class="btn\s+large\s+download"[^>]+>Download</a>''' + + def handleFree(self): + found = re.search(self.DOWNLOAD_LINK_PATTERN, self.html) + if not found: + self.parseError("Unable to detect the direct link") + download_link = found.group(1) + self.download(download_link, disposition=True) + +getInfo = create_getInfo(RgHostNet) |