diff options
author | Jeix <devnull@localhost> | 2011-06-30 18:15:35 +0200 |
---|---|---|
committer | Jeix <devnull@localhost> | 2011-06-30 18:15:35 +0200 |
commit | e0a3cdbefd3218d5d0453dd401230c79f9bc8035 (patch) | |
tree | 1cfe7da0c0ee90c45ef4ec1cf6824e54ecdb7b2d /module/plugins/hoster | |
parent | little thrift fixes, some new methods stubs (diff) | |
download | pyload-e0a3cdbefd3218d5d0453dd401230c79f9bc8035.tar.xz |
fixed #336 megavideo
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/MegavideoCom.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/module/plugins/hoster/MegavideoCom.py b/module/plugins/hoster/MegavideoCom.py index e4b41605b..fa5d87993 100644 --- a/module/plugins/hoster/MegavideoCom.py +++ b/module/plugins/hoster/MegavideoCom.py @@ -10,18 +10,25 @@ class MegavideoCom(Hoster): __name__ = "MegavideoCom" __type__ = "hoster" __pattern__ = r"http://(www\.)?megavideo.com/\?v=.*" - __version__ = "0.1" + __version__ = "0.2" __description__ = """Megavideo.com Download Hoster""" __author_name__ = ("jeix","mkaay") __author_mail__ = ("jeix@hasnomail.de","mkaay@mkaay.de") - def __init__(self, parent): - Hoster.__init__(self, parent) - self.parent = parent + def setup(self): self.html = None + def process(self, pyfile): + self.pyfile = pyfile + + if not self.file_exists(): + self.offline() + + self.pyfile.name = self.get_file_name() + self.download( self.get_file_url() ) + def download_html(self): - url = self.parent.url + url = self.pyfile.url self.html = self.req.load(url) def get_file_url(self): |