summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2012-01-27 15:26:28 +0100
committerGravatar Jeix <devnull@localhost> 2012-01-27 15:26:28 +0100
commit4e34bdf81680b9b8758680207a6e7af290eafbef (patch)
tree23e5ee000c196b38497ec19c0fe19aedc03f2de6 /module
parentfix fixed hoster fix (diff)
downloadpyload-4e34bdf81680b9b8758680207a6e7af290eafbef.tar.xz
Youtube Format fix
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/YoutubeCom.py10
1 files changed, 5 insertions, 5 deletions
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]