From c5ddf6568896c88e8cec20f558940a3db2a673bc Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 5 Jun 2011 18:22:06 +0200 Subject: youtube fix --- module/plugins/hoster/YoutubeCom.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 8eab8f384..048e1ab70 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -54,15 +54,16 @@ class YoutubeCom(Hoster): fmt_url_map = re.search(fmt_pattern, html).group(1) links = urllib.unquote(fmt_url_map).split(",") + fmt_dict = {} - for i in range(1, len(links)): - fmt = links[i].split("|")[0] + for link in links: + fmt = link.split("|")[0] try: fmt = int(fmt) except Exception: continue - fmt_dict[fmt] = links[i].split("|")[1] + fmt_dict[fmt] = link.split("|")[1] self.logDebug("Found links: %s" % fmt_dict) -- cgit v1.2.3