diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-29 12:32:12 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-29 12:32:12 +0100 |
commit | 8edf00933b4d7731bffc77c32faccffcf9d038fb (patch) | |
tree | ff13fed1319cf39a6daaaa2156703e0c37a1ff3e /module/plugins/hoster/YoutubeCom.py | |
parent | Update version. (diff) | |
parent | increase version (diff) | |
download | pyload-8edf00933b4d7731bffc77c32faccffcf9d038fb.tar.xz |
merge from stable
Diffstat (limited to 'module/plugins/hoster/YoutubeCom.py')
-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 b6ea36a3c..3ba40e937 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), @@ -64,16 +64,16 @@ 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(): if fmt not in self.formats: |