diff options
Diffstat (limited to 'module/plugins/hoster/MyvideoDe.py')
-rw-r--r-- | module/plugins/hoster/MyvideoDe.py | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/module/plugins/hoster/MyvideoDe.py b/module/plugins/hoster/MyvideoDe.py index 21d95d092..8af4a9a61 100644 --- a/module/plugins/hoster/MyvideoDe.py +++ b/module/plugins/hoster/MyvideoDe.py @@ -1,18 +1,22 @@ # -*- coding: utf-8 -*- import re + from module.plugins.Hoster import Hoster from module.unescape import unescape class MyvideoDe(Hoster): - __name__ = "MyvideoDe" - __type__ = "hoster" - __pattern__ = r'http://(?:www\.)?myvideo.de/watch/' - __version__ = "0.9" + __name__ = "MyvideoDe" + __type__ = "hoster" + __version__ = "0.90" + + __pattern__ = r'http://(?:www\.)?myvideo\.de/watch/' + __description__ = """Myvideo.de hoster plugin""" - __author_name__ = "spoob" - __author_mail__ = "spoob@pyload.org" + __license__ = "GPLv3" + __authors__ = [("spoob", "spoob@pyload.org")] + def process(self, pyfile): self.pyfile = pyfile @@ -20,19 +24,23 @@ class MyvideoDe(Hoster): pyfile.name = self.get_file_name() self.download(self.get_file_url()) + def download_html(self): 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) videoServer = re.search("rel='image_src' href='(.*)thumbs/.*' />", self.html).group(1) file_url = videoServer + videoId + ".flv" return file_url + def get_file_name(self): - file_name_pattern = r"<h1 class='globalHd'>(.*)</h1>" + file_name_pattern = r'<h1 class=\'globalHd\'>(.*)</h1>' return unescape(re.search(file_name_pattern, self.html).group(1).replace("/", "") + '.flv') + def file_exists(self): self.download_html() self.load(str(self.pyfile.url), cookies=False, just_header=True) |