On Mar 3, 2015, at 10:00 AM, Brad Jorsch (Anomie)
<bjorsch(a)wikimedia.org> wrote:
On Tue, Mar 3, 2015 at 12:14 AM, Dmitry Talisman <dmitry.talisman(a)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&exchar…
<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&excha…
<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&excha…
<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(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api