From 815efcb9021614a7451bba876acc7eeeaf9579db Mon Sep 17 00:00:00 2001 From: rainyday Date: Fri, 3 Dec 2010 05:25:51 +0800 Subject: [PATCH] Edited youtube filter so bot can return limited information on restricted videos (ex: not allowed in bot's region). --- plugins/youtube.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/youtube.py b/plugins/youtube.py index e2b8d45..747a1b2 100644 --- a/plugins/youtube.py +++ b/plugins/youtube.py @@ -26,6 +26,9 @@ def get_video_description(vid_id): out = '\x02%s\x02' % j['title'] + if not j.get('duration'): + return out + out += ' - length \x02' length = j['duration'] if length / 3600: # > 1 hour