diff options
author | Jeix <devnull@localhost> | 2010-08-08 13:17:16 +0200 |
---|---|---|
committer | Jeix <devnull@localhost> | 2010-08-08 13:17:16 +0200 |
commit | 66017ac9de79ee21aed780882177eeb22128cc87 (patch) | |
tree | 34c630782214a91b4efdc7af2b47adc474f0de8c /module/plugins/hoster/MyvideoDe.py | |
parent | Handling special cases in log (empty, non existing..) (diff) | |
download | pyload-66017ac9de79ee21aed780882177eeb22128cc87.tar.xz |
ccf fix and myvideo.de
Diffstat (limited to 'module/plugins/hoster/MyvideoDe.py')
-rw-r--r-- | module/plugins/hoster/MyvideoDe.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/module/plugins/hoster/MyvideoDe.py b/module/plugins/hoster/MyvideoDe.py index 5412fd570..f2d2082a7 100644 --- a/module/plugins/hoster/MyvideoDe.py +++ b/module/plugins/hoster/MyvideoDe.py @@ -2,6 +2,7 @@ import re from module.plugins.Hoster import Hoster +from module.unescape import unescape class MyvideoDe(Hoster): __name__ = "MyvideoDe" @@ -12,14 +13,17 @@ class MyvideoDe(Hoster): __author_name__ = ("spoob") __author_mail__ = ("spoob@pyload.org") - def __init__(self, parent): - Hoster.__init__(self, parent) - self.parent = parent + def setup(self): self.html = None - self.url = self.parent.url + + def process(self, pyfile): + self.pyfile = pyfile + self.download_html() + pyfile.name = self.get_file_name() + self.download(self.get_file_url()) def download_html(self): - self.html = self.load(self.url) + self.html = self.load(self.pyfile.url) def get_file_url(self): videoId = re.search(r"addVariable\('_videoid','(.*)'\);p.addParam\('quality'", self.html).group(1) @@ -29,11 +33,11 @@ class MyvideoDe(Hoster): def get_file_name(self): file_name_pattern = r"<h1 class='globalHd'>(.*)</h1>" - return re.search(file_name_pattern, self.html).group(1).replace("/", "") + '.flv' + return unescape(re.search(file_name_pattern, self.html).group(1).replace("/", "") + '.flv') def file_exists(self): self.download_html() - self.load(str(self.url), cookies=False, just_header=True) + self.load(str(self.pyfile.url), cookies=False, just_header=True) if self.req.lastEffectiveURL == "http://www.myvideo.de/": return False return True |