diff --git a/ox/web/google.py b/ox/web/google.py index e29f754..ff5e0e6 100644 --- a/ox/web/google.py +++ b/ox/web/google.py @@ -42,10 +42,10 @@ def find(query, max_results=DEFAULT_MAX_RESULTS, timeout=DEFAULT_TIMEOUT): Return max_results tuples with title, url, description >>> find("The Matrix site:imdb.com", 1)[0][0] - u'The Matrix (1999)' + 'The Matrix (1999) - IMDb' >>> find("The Matrix site:imdb.com", 1)[0][1] - u'http://www.imdb.com/title/tt0133093/' + 'http://www.imdb.com/title/tt0133093/' """ _results = _find(query, timeout=timeout) results = [] @@ -60,10 +60,10 @@ def _find(query, timeout=DEFAULT_TIMEOUT): Return parsed json results from google ajax api >>> _find("The Matrix site:imdb.com")[0]['titleNoFormatting'] - u'The Matrix (1999)' + 'The Matrix (1999) - IMDb' >>> _find("The Matrix site:imdb.com")[0]['url'] - u'http://www.imdb.com/title/tt0133093/' + 'http://www.imdb.com/title/tt0133093/' """ url = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=%s' % quote_plus(query) results = json.loads(ox.cache.readUrl(url, timeout=timeout))['responseData']['results'] diff --git a/ox/web/imdb.py b/ox/web/imdb.py index 4d951c3..b17b927 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -309,7 +309,7 @@ def getMovieId(title, director='', year='', timeout=-1): >>> getMovieId('2 or 3 Things I Know About Her', 'Jean-Luc Godard', '1967') u'0060304' - >>> getMovieId(u'Histoire(s) du cinema: Le controle de l'univers', 'Jean-Luc Godard') + >>> getMovieId(u"Histoire(s) du cinema: Le controle de l'univers", 'Jean-Luc Godard') u'0179214' >>> getMovieId(u"Histoire(s) du cinéma: Le contrôle de l'univers", 'Jean-Luc Godard')