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

fix issue #304 fallback for bad wikipedia.org title suggestion #305

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hobson
Copy link

@hobson hobson commented Feb 24, 2022

@wlerin
Copy link

wlerin commented Jun 29, 2022

Not a contributor/maintainer, but that has way too many formatting changes to tell what you actually changed.

Edit: After some searching around and looking at the expected locations to be changed, I really don't see the point of this. The main problem isn't that suggestion sometimes (nearly always) returns bonkers "suggestions", it's that those take precedence over actual pages. A library that is meant to be incorporated into other programs (some of them non-interactive) spewing out a bunch of capital letters won't fix that.

@theptrk
Copy link

theptrk commented Aug 21, 2024

Someone should just make a PR that changes that priority.

Its right here:

title = suggestion or results[0]

    if auto_suggest:
      results, suggestion = search(title, results=1, suggestion=True)
      try:
        title = suggestion or results[0]
      except IndexError:
        # if there is no suggestion or search results, the page doesn't exist
        raise PageError(title)

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

Successfully merging this pull request may close these issues.

"Creatity page not found" when retrieving page for "Creativity"
3 participants