From 4e34bdf81680b9b8758680207a6e7af290eafbef Mon Sep 17 00:00:00 2001 From: Jeix Date: Fri, 27 Jan 2012 15:26:28 +0100 Subject: Youtube Format fix --- module/plugins/hoster/YoutubeCom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/YoutubeCom.py') diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 2b3ea7ed7..3d204895b 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -64,18 +64,18 @@ class YoutubeCom(Hoster): if self.getConfig("fmt"): desired_fmt = self.getConf("fmt") - flashvars = re.search(r"flashvars=\"([^\"]+)", html) + flashvars = re.search(r'flashvars=\\"(.*?)\\"', html) flashvars = unquote(flashvars.group(1)) - fmts = re.findall(r"itag=(\d+),url=([^&]+)", flashvars) - + fmts = re.findall(r'url=(.*?)%3B.*?itag=(\d+)', flashvars) fmt_dict = {} - for fmt, url in fmts: + for url, fmt in fmts: fmt = int(fmt) fmt_dict[fmt] = unquote(url) + self.logDebug("Found links: %s" % fmt_dict) - for fmt in fmt_dict.keys(): + for fmt in fmt_dict.keys(): if fmt not in self.formats: self.logDebug("FMT not supported: %s" % fmt) del fmt_dict[fmt] -- cgit v1.2.3 From 7312fb0197650a329d5343b1ef16ddb27cc3fa70 Mon Sep 17 00:00:00 2001 From: Jeix Date: Fri, 27 Jan 2012 20:56:18 +0100 Subject: youtube increase version number --- module/plugins/hoster/YoutubeCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/YoutubeCom.py') diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 3d204895b..222e9bf84 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -11,7 +11,7 @@ class YoutubeCom(Hoster): __name__ = "YoutubeCom" __type__ = "hoster" __pattern__ = r"http://(www\.)?(de\.)?\youtube\.com/watch\?v=.*" - __version__ = "0.24" + __version__ = "0.25" __config__ = [("quality", "sd;hd;fullhd", "Quality Setting", "hd"), ("fmt", "int", "FMT Number 0-45", 0), (".mp4", "bool", "Allow .mp4", True), -- cgit v1.2.3