diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-10 03:02:26 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-10 03:02:26 +0200 |
commit | 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 (patch) | |
tree | 703010e32f62bf869551ce0d323dacf62bc448ff /module/plugins/hoster/RgHostNet.py | |
parent | [SimpleCrypter] Support parseError (diff) | |
download | pyload-04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8.tar.xz |
Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics
Diffstat (limited to 'module/plugins/hoster/RgHostNet.py')
-rw-r--r-- | module/plugins/hoster/RgHostNet.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py index 4c6e040cb..b6d34e4fc 100644 --- a/module/plugins/hoster/RgHostNet.py +++ b/module/plugins/hoster/RgHostNet.py @@ -15,10 +15,10 @@ class RgHostNet(SimpleHoster): 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' - DOWNLOAD_LINK_PATTERN = '''<a\s+href="([^"]+)"\s+class="btn\s+large\s+download"[^>]+>Download</a>''' + LINK_PATTERN = r'''<a\s+href="([^"]+)"\s+class="btn\s+large\s+download"[^>]+>Download</a>''' def handleFree(self): - found = re.search(self.DOWNLOAD_LINK_PATTERN, self.html) + found = re.search(self.LINK_PATTERN, self.html) if not found: self.parseError("Unable to detect the direct link") download_link = found.group(1) |