From 66017ac9de79ee21aed780882177eeb22128cc87 Mon Sep 17 00:00:00 2001 From: Jeix Date: Sun, 8 Aug 2010 13:17:16 +0200 Subject: ccf fix and myvideo.de --- module/plugins/container/CCF.py | 4 ++-- module/plugins/hoster/MyvideoDe.py | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'module') diff --git a/module/plugins/container/CCF.py b/module/plugins/container/CCF.py index a18a7c309..8b35589f3 100644 --- a/module/plugins/container/CCF.py +++ b/module/plugins/container/CCF.py @@ -8,7 +8,7 @@ from module.plugins.Container import Container from module.network.MultipartPostHandler import MultipartPostHandler from os import makedirs -from os.path import exists +from os.path import exists, join class CCF(Container): __name__ = "CCF" @@ -33,7 +33,7 @@ class CCF(Container): if not exists(location): makedirs(location) - tempdlc_name = "tmp_%s.dlc" % join(location, pyfile.name) + tempdlc_name = join(location, "tmp_%s.dlc" % pyfile.name) tempdlc = open(tempdlc_name, "w") tempdlc.write(re.search(r'(.*)', tempdlc_content, re.DOTALL).group(1)) tempdlc.close() 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"

(.*)

" - 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 -- cgit v1.2.3