Skip to content
Browse files

azappella got it working again

  • Loading branch information...
1 parent e49fc55 commit 3db20fbe21d826d1c90a1325b7d755336118eabe @pkrumins committed Sep 25, 2010
Showing with 9 additions and 3 deletions.
  1. +3 −0 contributors.txt
  2. +6 −3 xgoogle/search.py
View
3 contributors.txt
@@ -13,6 +13,9 @@ This file contains people who have helped xgoogle project:
* Steve Steiner
Thanks for adding setup.py
+ * azappella
+ Thanks for fixing search.py after redesign
+
PS. If I missed you, please email me at peter@catonmat.net, and I'll add you here!
View
9 xgoogle/search.py
@@ -146,15 +146,18 @@ def get_results(self):
""" Gets a page of results """
if self.eor:
return []
-
+ MAX_VALUE = 1000000
page = self._get_results_page()
- search_info = self._extract_info(page)
+ #search_info = self._extract_info(page)
+ results = self._extract_results(page)
+ search_info = {'from': self.results_per_page*self._page,
+ 'to': self.results_per_page*self._page + len(results),
+ 'total': MAX_VALUE}
if not self.results_info:
self.results_info = search_info
if self.num_results == 0:
self.eor = True
return []
- results = self._extract_results(page)
if not results:
self.eor = True
return []

0 comments on commit 3db20fb

Please sign in to comment.
Something went wrong with that request. Please try again.