From 8038b0d13fe126a1ab4cef2e7eca1872dac5cc17 Mon Sep 17 00:00:00 2001
From: j <0x006A@0x2620.org>
Date: Fri, 31 May 2013 22:05:25 +0200
Subject: [PATCH] fix google parser, and by that imdb id lookup, fixes #1545
---
ox/web/google.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/ox/web/google.py b/ox/web/google.py
index 34c6e31..91fccf1 100644
--- a/ox/web/google.py
+++ b/ox/web/google.py
@@ -31,9 +31,7 @@ def find(query, max_results=DEFAULT_MAX_RESULTS, timeout=DEFAULT_TIMEOUT):
data = read_url(url, timeout=timeout)
results = []
data = re.sub('(.*?)', '\\1', data)
- for a in re.compile(
- '(.*?).*?(.*?)<\/span>'
- ).findall(data):
+ for a in re.compile('(.*?).*?(.*?)<\/span>').findall(data):
results.append((strip_tags(decode_html(a[1])), a[0], strip_tags(decode_html(a[2]))))
if len(results) >= max_results:
break