diff options
author | Jeix <devnull@localhost> | 2012-01-27 15:26:28 +0100 |
---|---|---|
committer | Jeix <devnull@localhost> | 2012-01-27 15:26:28 +0100 |
commit | 4e34bdf81680b9b8758680207a6e7af290eafbef (patch) | |
tree | 23e5ee000c196b38497ec19c0fe19aedc03f2de6 /module | |
parent | fix fixed hoster fix (diff) | |
download | pyload-4e34bdf81680b9b8758680207a6e7af290eafbef.tar.xz |
Youtube Format fix
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hoster/YoutubeCom.py | 10 |
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] |