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

Cannot find disambiguation page #182

Open
paulblartmallcop9 opened this issue Feb 21, 2025 · 0 comments
Open

Cannot find disambiguation page #182

paulblartmallcop9 opened this issue Feb 21, 2025 · 0 comments

Comments

@paulblartmallcop9
Copy link

paulblartmallcop9 commented Feb 21, 2025

I want to use wptools but I get stuck after getting a page.

Here I am using thr Ghandi disambiguation page in Dutch.

page = wptools.page('Gandhi', wiki='nl.wikiquote.org').get_query()

This gives an error:

LookupError: https://nl.wikiquote.org/w/api.php action=query&exintro&formatversion=2&inprop=url|watchers&list=random&pithumbsize=240&pllimit=500&ppprop=disambiguation|wikibase_item&prop=extracts|info|links|pageassessments|pageimages|pageprops|pageterms|redirects&redirects&rdlimit=500&rnlimit=1&rnnamespace=0&titles=Gandhi

I am following examples from this website https://pypi.org/project/wptools/0.2.0/ in order to set it up for finding links on a disambiguation page. I am using Ghandi here just to try it out.

When I use the normal Ghandi page it also gives an error when wanting to get anything out of the WPToolsPage object.

page = wptools.page('Mahatma Gandhi', wiki='nl.wikiquote.org').get_query()
page.image('page')['url']

It gives this error:

AttributeError: 'WPToolsPage' object has no attribute 'image'

The warning automatically shown does show that it retrieves information but I am unable to access it.

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

1 participant