summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/RgHostNet.py
diff options
context:
space:
mode:
authorGravatar synweap15 <shamdog+github@gmail.com> 2014-12-30 20:21:23 +0100
committerGravatar synweap15 <shamdog+github@gmail.com> 2014-12-30 20:21:23 +0100
commitac9ba34bd5e629ddfbe67dec88ff2e0653e80356 (patch)
treef77bc281bd083145b19e82bf0e5ff34f5cd6f01a /module/plugins/hoster/RgHostNet.py
parent[Oboom] new hoster and account (diff)
parentUpdate some MultiHoster __pattern__ (diff)
downloadpyload-ac9ba34bd5e629ddfbe67dec88ff2e0653e80356.tar.xz
Merge pull request #1 from pyload/stable
Merge
Diffstat (limited to 'module/plugins/hoster/RgHostNet.py')
-rw-r--r--module/plugins/hoster/RgHostNet.py31
1 files changed, 15 insertions, 16 deletions
diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py
index 9e37ed87b..aa4830563 100644
--- a/module/plugins/hoster/RgHostNet.py
+++ b/module/plugins/hoster/RgHostNet.py
@@ -1,27 +1,26 @@
# -*- coding: utf-8 -*-
import re
+
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RgHostNet(SimpleHoster):
- __name__ = "RgHostNet"
- __type__ = "hoster"
+ __name__ = "RgHostNet"
+ __type__ = "hoster"
+ __version__ = "0.03"
+
__pattern__ = r'http://(?:www\.)?rghost\.net/\d+(?:r=\d+)?'
- __version__ = "0.01"
+
__description__ = """RgHost.net hoster plugin"""
- __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)
+ __license__ = "GPLv3"
+ __authors__ = [("z00nx", "z00nx0@gmail.com")]
+
+
+ INFO_PATTERN = r'<h1>\s+(<a[^>]+>)?(?P<N>[^<]+)(</a>)?\s+<small[^>]+>\s+\((?P<S>[^)]+)\)\s+</small>\s+</h1>'
+ OFFLINE_PATTERN = r'File is deleted|this page is not found'
+
+ LINK_FREE_PATTERN = r'<a\s+href="([^"]+)"\s+class="btn\s+large\s+download"[^>]+>Download</a>'
+
getInfo = create_getInfo(RgHostNet)