diff --git a/xgoogle/search.py b/xgoogle/search.py index 98b681e..d5306fc 100755 --- a/xgoogle/search.py +++ b/xgoogle/search.py @@ -322,7 +322,8 @@ def _extract_info(self, soup): return {'from': int(matches.group(1)), 'to': int(matches.group(2)), 'total': int(matches.group(3))} def _extract_results(self, soup): - results = soup.findAll('p', {'class': 'g'}) + #results = soup.findAll('p', {'class': 'g'}) + results = soup.findAll('li','g') ret_res = [] for result in results: eres = self._extract_result(result) @@ -352,7 +353,8 @@ def _extract_title_url(self, result): return title, url def _extract_description(self, result): - desc_td = result.findNext('td') + #desc_td = result.findNext('td') + desc_div = result.find('span', 'st') if not desc_td: self._maybe_raise(ParseError, "Description tag in Google search result was not found", result) return None