Hi,
While working on my app I came across an issue with extracts that does not work for certain pages. The extracts is always empty. For example (Newark International Airport):
http://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars... http://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars=175&pageids=263652
As a metter of fact, I could not find an airport page for which extract API would work. May be something is wrong ( or special ) with the airport template …
Is this a known problem ? any workaround suggestions ?
Thank you , Dmitry.
Thanks for reporting, created https://phabricator.wikimedia.org/T91367
On Mon, Mar 2, 2015 at 9:14 PM, Dmitry Talisman dmitry.talisman@gmail.com wrote:
Hi,
While working on my app I came across an issue with extracts that does not work for certain pages. The extracts is always empty. For example (Newark International Airport):
http://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars...
As a metter of fact, I could not find an airport page for which extract API would work. May be something is wrong ( or special ) with the airport template …
Is this a known problem ? any workaround suggestions ?
Thank you , Dmitry.
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
On Tue, Mar 3, 2015 at 12:14 AM, Dmitry Talisman dmitry.talisman@gmail.com wrote:
While working on my app I came across an issue with extracts that does not work for certain pages. The extracts is always empty. For example (Newark International Airport):
http://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars...
I note the pageid you're specifying is a redirect page. If we use the target of the redirect instead, it seems to work fine:
https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchar...
You can even ask the API to bypass the redirect for you:
https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchar...
Thank you ! This solved the issue.
On Mar 3, 2015, at 10:00 AM, Brad Jorsch (Anomie) bjorsch@wikimedia.org wrote:
On Tue, Mar 3, 2015 at 12:14 AM, Dmitry Talisman <dmitry.talisman@gmail.com mailto:dmitry.talisman@gmail.com> wrote: While working on my app I came across an issue with extracts that does not work for certain pages. The extracts is always empty. For example (Newark International Airport):
http://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars... http://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars=175&pageids=263652
I note the pageid you're specifying is a redirect page. If we use the target of the redirect instead, it seems to work fine:
https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchar... https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars=175&pageids=248492
You can even ask the API to bypass the redirect for you:
https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchar... https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars=175&pageids=263652&redirects=1
-- Brad Jorsch (Anomie) Software Engineer Wikimedia Foundation _______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
mediawiki-api@lists.wikimedia.org