Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: always reports 0 results #3

Open
MarioVilas opened this issue Jun 25, 2010 · 4 comments
Open

Bug: always reports 0 results #3

MarioVilas opened this issue Jun 25, 2010 · 4 comments

Comments

@MarioVilas
Copy link

A patch seems to be available here: http://pastebin.com/8VB5cKk5

@pkrumins
Copy link
Owner

def get_results(self):
""" Gets a page of results """
#if self.eor:
# return []

    page = self._get_results_page()
    search_info = self._extract_info(page)
    #if not self.results_info:
    #    self.results_info = search_info
    #    if self.num_results == 0:
    #        self.eor = True
    #        return []
    results = self._extract_results(page)

return results
    if not results:
        self.eor = True
        return []
    if self._page > 0 and search_info['from'] == self._last_from:
        self.eor = True
        return []
    if search_info['to'] == search_info['total']:
        self.eor = True
    self._page += 1
    self._last_from = search_info['from']
    return results

@pkrumins
Copy link
Owner

i copied the fix here, so that i can apply it later when i am enthusiastic enough to fix this bug.

@azappella
Copy link

Hi, I added/commited the original fix found here http://www.catonmat.net/c/3009 for convenience. It seems to work for me, but I haven't tested thoroughly. The new updated search.py can be found here in the meanwhile:
http://github.com/azappella/xgoogle/commit/43298903b8b426cb11cdd251691234abccf00cdc

@pkrumins
Copy link
Owner

Hi! I am gonna try this shortly and report back, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants