# -*- coding: utf-8 -*-
import re
from module.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"""
__authors__ = [("z00nx", "z00nx0@gmail.com")]
FILE_INFO_PATTERN = r'
\s+(]+>)?(?P[^<]+)()?\s+]+>\s+\((?P[^)]+)\)\s+\s+
'
OFFLINE_PATTERN = r'File is deleted|this page is not found'
LINK_PATTERN = r''']+>Download'''
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)