Edited youtube filter so bot can return limited information on

restricted videos (ex: not allowed in bot's region).
This commit is contained in:
rainyday 2010-12-03 05:25:51 +08:00 committed by rmmh
parent b21c3e432f
commit 815efcb902
1 changed files with 3 additions and 0 deletions

View File

@ -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