-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Allow specifying language variant #209
Comments
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 10 days with no activity. |
When I use the API - the information about variant is not returned as part of the API response - https://zh.wikipedia.org/wiki/Special:API%E6%B2%99%E7%9B%92?uselang=en#action=query&format=json&variant=zh-tw&prop=info&titles=10&formatversion=2&inprop=displaytitle%7Ceditintro%7Cnotificationtimestamp%7Cpreloadcontent%7Cprotection%7Curl%7Clinkclasses%7Csubjectid%7Ctalkid%7Cvarianttitles%7Cvisitingwatchers%7Cwatched%7Cwatchers Is this correct? |
Some wikipedia pages (such as Serbian and Chinese) have multiple language variants that are equivalent.
Fetching the content is then dependent on the variant variable in the API: https://zh.wikipedia.org/wiki/Special:API%E6%B2%99%E7%9B%92?uselang=en#action=parse&format=json&variant=zh-tw&page=Main%20Page&formatversion=2
I'm currently working around this by monkey-patching the
wikipediaapi.Wikipedia._query
method like this:Ideally there would be a way to specify extra params that go to the wikipedia call, not just to the request library.
The text was updated successfully, but these errors were encountered: