From 037bd575bfd97b8e0ebd0bc1ed37dd8beed630e1 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 9 Dec 2008 19:04:36 +0100 Subject: [PATCH] looks like this does not allways happen --- oxweb/youtube.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oxweb/youtube.py b/oxweb/youtube.py index fccfdb4..6d1aab5 100644 --- a/oxweb/youtube.py +++ b/oxweb/youtube.py @@ -47,7 +47,8 @@ def getInfoFromAtom(entry, video_url_base=None): info['description'] = entry['description'] info['author'] = entry['author'] #info['published'] = entry['published_parsed'] - info['keywords'] = entry['media_keywords'].split(', ') + if 'media_keywords' in entry: + info['keywords'] = entry['media_keywords'].split(', ') info['url'] = entry['links'][0]['href'] info['id'] = findString(info['url'], "/watch?v=") info['thumbnail'] = "http://img.youtube.com/vi/%s/0.jpg" % info['id']