From 14597c3974613c6c2663c07c9ae135fe7f2d2527 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 17 Sep 2007 08:40:02 +0000 Subject: [PATCH] optional episode date --- scrapeit/imdb.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scrapeit/imdb.py b/scrapeit/imdb.py index 004ed44..72b0728 100644 --- a/scrapeit/imdb.py +++ b/scrapeit/imdb.py @@ -348,10 +348,13 @@ class IMDb: description = stripTags(description.split('Next US airings:')[0]) episodes[episode]['description'] = description episodes[episode]['date'] = '' - d = stripTags(match[4]) - d = d.replace('Original Air Date: ', '') - d = time.strftime("%Y-%m-%d", time.strptime(d, '%d %B %Y')) - episodes[episode]['date'] = d + try: + d = stripTags(match[4]) + d = d.replace('Original Air Date: ', '') + d = time.strftime("%Y-%m-%d", time.strptime(d, '%d %B %Y')) + episodes[episode]['date'] = d + except: + pass except: import traceback print traceback.print_exc()