summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster/RgHostNet.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/hoster/RgHostNet.py')
-rw-r--r--pyload/plugins/hoster/RgHostNet.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/pyload/plugins/hoster/RgHostNet.py b/pyload/plugins/hoster/RgHostNet.py
new file mode 100644
index 000000000..0240f3a05
--- /dev/null
+++ b/pyload/plugins/hoster/RgHostNet.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+
+
+class RgHostNet(SimpleHoster):
+ __name__ = "RgHostNet"
+ __type__ = "hoster"
+ __version__ = "0.01"
+
+ __pattern__ = r'http://(?:www\.)?rghost\.net/\d+(?:r=\d+)?'
+
+ __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>'
+ OFFLINE_PATTERN = r'File is deleted|this page is not found'
+ LINK_PATTERN = r'''<a\s+href="([^"]+)"\s+class="btn\s+large\s+download"[^>]+>Download</a>'''
+
+
+ def handleFree(self):
+ m = re.search(self.LINK_PATTERN, self.html)
+ if m is None:
+ self.parseError("Unable to detect the direct link")
+ download_link = m.group(1)
+ self.download(download_link, disposition=True)
+
+
+getInfo = create_getInfo(RgHostNet)