From 2c7b3466f72432b6258416de0c75ddb940032f2d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 23 Dec 2010 14:23:53 +0530 Subject: [PATCH] work around imdb quirks in guessing ids --- ox/web/imdb.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ox/web/imdb.py b/ox/web/imdb.py index 308e10b..f50cb0b 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -345,6 +345,12 @@ def guess(title, director='', timeout=google.DEFAULT_TIMEOUT): title = title.split('.')[0] title = title.strip() ''' + static = { + (u"Histoire(s) du cinema: Le controle de l'univers", 'Jean-Luc Godard'): '0179214' + (u"Histoire(s) du cinéma: Le contrôle de l'univers", 'Jean-Luc Godard'): '0179214', + }.get((title, director), None) + if static: + return static imdb_url = 'http://www.imdb.com/find?q=%s' % quote(title.encode('utf-8')) return_url = ''