diff --git a/oxweb/google.py b/oxweb/google.py
index 1109d05..2362cba 100644
--- a/oxweb/google.py
+++ b/oxweb/google.py
@@ -28,17 +28,17 @@ google.find(query, max_results)
FIXME: how search depper than first page?
'''
DEFAULT_MAX_RESULTS = 10
+DEFAULT_TIMEOUT = 24*60*60
-def getUrl(url, data=None, headers=oxlib.net.DEFAULT_HEADERS):
- google_timeout=24*60*60
- return oxlib.cache.getUrl(url, data, headers, google_timeout)
+def getUrl(url, data=None, headers=oxlib.net.DEFAULT_HEADERS, timeout=DEFAULT_TIMEOUT):
+ return oxlib.cache.getUrl(url, data, headers, timeout)
def quote_plus(s):
return urllib.quote_plus(s.encode('utf-8'))
-def find(query, max_results=DEFAULT_MAX_RESULTS):
+def find(query, max_results=DEFAULT_MAX_RESULTS, timeout=DEFAULT_TIMEOUT):
url = "http://www.google.com/search?q=%s" % quote_plus(query)
- data = getUrl(url)
+ data = getUrl(url, timeout=timeout)
link_re = r'(?P
|