From 50794cb74162c0b600ff73b349541c5a640106cb Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 12 Aug 2010 22:45:09 +0200 Subject: [PATCH] fix youtube id --- ox/web/youtube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ox/web/youtube.py b/ox/web/youtube.py index 5042c59..fc4c176 100644 --- a/ox/web/youtube.py +++ b/ox/web/youtube.py @@ -50,7 +50,7 @@ def getInfoFromAtom(entry, video_url_base=None): 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['id'] = findRe(info['url'], r'\?v=(.*?)&') info['thumbnail'] = "http://img.youtube.com/vi/%s/0.jpg" % info['id'] if video_url_base: info['flv'] = "%s/%s.%s" % (video_url_base, info['id'], 'flv')