Thanks Ryan and Stephan.
On Sat, Sep 3, 2016 at 7:45 PM, Stephen Niedzielski < sniedzielski@wikimedia.org> wrote:
A bit of a corner case, but I think you also need to check that the page title isn't "Main Page" (across all localizations).
On Fri, Sep 2, 2016 at 5:13 AM, Ryan Kaldari rkaldari@wikimedia.org wrote:
This is actually a bit complicated. If you have the title of an article, like "Earth", you would want to do an API query like: https://en.wikipedia.org/w/api.php?action=query&titles= Earth&redirects&prop=pageprops
You would then need to check 3 different things in the result:
- Is the page in the main namespace ("ns": 0)?
- Is the page a redirect? See
https://en.wikipedia.org/w/api.php?titles=!&redirects& action=query&prop=pageprops for an example. 3. Is the page a disambiguation page (pageprops.disambiguation)? See https://en.wikipedia.org/w/api.php?titles=Georgia& redirects&action=query&prop=pageprops for an example.
On Thu, Sep 1, 2016 at 11:57 PM, Abdulfattah Safa <fattah.safa@gmail.com
wrote:
Hi,
How to check if a Wikipedia page is article or not using the API?
-- Regards, Abdulfattah Safa Senior Software Engineer Mobile: (+972)(599)231600 Skype: fattah.safa
*P **Please consider the environment before printing this email* _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l