diff options
| author | 2011-11-13 00:47:02 +0100 | |
|---|---|---|
| committer | 2011-11-13 00:47:02 +0100 | |
| commit | e3a62f8a2e9dcb4212f6fa8e1a94f832ad66d35a (patch) | |
| tree | 121b107759d11e11890267355119ecf47e3e7fba /module/plugins/hoster/HellspyCz.py | |
| parent | Merged in nick_de/pyload (pull request #5) (diff) | |
| download | pyload-e3a62f8a2e9dcb4212f6fa8e1a94f832ad66d35a.tar.xz | |
Move getFileInfo to SimpleHoster.py; update Mediafire
Diffstat (limited to 'module/plugins/hoster/HellspyCz.py')
| -rw-r--r-- | module/plugins/hoster/HellspyCz.py | 28 | 
1 files changed, 6 insertions, 22 deletions
| diff --git a/module/plugins/hoster/HellspyCz.py b/module/plugins/hoster/HellspyCz.py index fb7fa41dc..e1077a0cb 100644 --- a/module/plugins/hoster/HellspyCz.py +++ b/module/plugins/hoster/HellspyCz.py @@ -17,39 +17,23 @@  """  import re -from module.plugins.Hoster import Hoster +from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo  from module.network.RequestFactory import getURL  def getInfo(urls):      result = []      for url in urls: - -        html = getURL(url, decode=True) -        if re.search(HellspyCz.FILE_OFFLINE_PATTERN, html): -            # File offline -            result.append((url, 0, 1, url)) -        else: -            # Get file info -            found = re.search(HellspyCz.FILE_NAME_PATTERN, html) -            if found is not None: -                name = found.group(1) -                found = re.search(HellspyCz.FILE_CREDITS_PATTERN, html) -                if found is not None: -                    size = float(found.group(1)) -                    units = found.group(2) - -                    pow = {'kB' : 1, 'MB' : 2, 'GB' : 3}[units] -                    size = int(size*1024**pow) - -                    result.append((name, size, 2, url)) +        file_info = parseFileInfo(HellspyCz, url, getURL(url, decode=True))  +        result.append(file_info) +                  yield result -class HellspyCz(Hoster): +class HellspyCz(SimpleHoster):      __name__ = "HellspyCz"      __type__ = "hoster"      __pattern__ = r"http://(?:\w*\.)*hellspy\.(?:cz|com|sk|hu)(/\S+/\d+)/?.*" -    __version__ = "0.2" +    __version__ = "0.21"      __description__ = """HellSpy.cz"""      __author_name__ = ("zoidberg")      __author_mail__ = ("zoidberg@mujmail.cz") | 
