Hello,
I am writing a Java program to extract the abstract of the wikipedia page
given the title of the wikipedia page. I have done some research and found
out that the abstract with be in rvsection=0
So for example if I want the abstract of 'Eiffel Tower" wiki page then I am
querying using the api in the following way.
http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Eiffel…
and parse the XML data which we get and take the wikitext in the tag <rev
xml:space="preserve"> which represents the abstract of the wikipedia page.
But this wiki text also contains the infobox data which I do not need. I
would like to know if there is anyway in which I can remove the infobox data
and get only the wikitext related to the page's abstract Or if there is any
alternative method by which I can get the abstract of the page directly.
Looking forward to your help.
Thanks in Advance
Aditya Uppu
When list=allusers is used with auactiveusers, a property 'recenteditcount'
is returned in the result. In bug 67301[1] it was pointed out that this
property is including various other logged actions, and so should really be
named something like "recentactions".
Gerrit change 130093,[2] merged today, adds the "recentactions" result
property. "recenteditcount" is also returned for backwards compatability,
but will be removed at some point during the MediaWiki 1.25 development
cycle.
Any clients using this property should be updated to use the new property
name. The new property will be available on WMF wikis with 1.24wmf12, see
https://www.mediawiki.org/wiki/MediaWiki_1.24/Roadmap for the schedule.
[1]: https://bugzilla.wikimedia.org/show_bug.cgi?id=67301
[2]: https://gerrit.wikimedia.org/r/#/c/130093/
--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api-announce mailing list
Mediawiki-api-announce(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
I am trying to query the Wikidata api using the following action: action=query&generator=search&gsrsearch. The query works but what I want back as a result is human readable data about the entity. See below results:
https://www.wikidata.org/w/api.php?action=query&generator=search&gsrsearch=…
I was expecting it to work that same a the wikipedia api. I can ask for various properties from the Wikipedia page. See below:
http://en.wikipedia.org/w/api.php?format=json&action=query&generator=search…<http://en.wikipedia.org/w/api.php?format=json&action=query&generator=search…>
So what I would expect is to get back human readable labels and descriptions (when applicable) from the api (the same way you do with a wbsearchentities query). I wanted to just use the wbsearchentities action but the index seems to be acting odd (it looks like it is a prefix search or something like that).
For example if I do a entity search for 'columbus' one of the results is Columbus Ohio and the results include human readable strings:
https://www.wikidata.org/w/api.php?action=wbsearchentities&search=columbus&…
But if I add Ohio to the search query the only result is for "Columbus Ohio Temple".
https://www.wikidata.org/w/api.php?action=wbsearchentities&search=columbus%…
The issue that I am running into is that I am trying to match oddly formatted entity labels (It's library authority data...) to entities in Wikidata and I really do not want to do much string manipulation on the original entity label.
Does anyone have any solutions or suggestions?
Thanks,
Jeff Mixter
Software Engineer
OCLC Research
614-761-5159
mixterj(a)oclc.org
I am working on retrieving some particular bio details of a person from
wikipedia page of that person through *wikipedia web API*.
I need to retrieve the *bio information box* of a person.
*--------------------------------------------------------------------------------------------*
[image: Bio information of Mark Babic]
*-----------------------------------------------------------------------------------------------*
*I found how to retrieve the content box , introduction paragraph and all.* The
below URL is used to retrieve the first introduction para of the wiki
webpage.
https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&e…
1)But I am struck with getting the above bio information box through wiki
web api.So that i could*extract the specific details i want.*
2) Is it possible to get a *single information* like only the full name of
the person or only DOB of the person *through a single query* (instead of
getting the bio whole information and extracting the details from it).
After a lot of work, we're ready to provide a more sensible data layout for
format=json results (and also format=php). You can enable this in your
requests by adding "&formatversion=2", but do note that the output
formatting isn't entirely stable yet and might change without warning.
Without specifying formatversion=2, things should be backwards-compatible.
But there are some caveats:
- Modules that were previously outputting raw booleans in JSON may now
have those properties being output using the standard convention:
empty-string for true and absent for false. Instances of this should be
reported in Phabricator <https://phabricator.wikimedia.org/> to be
fixed, please tag with #MediaWiki-API
<https://phabricator.wikimedia.org/project/profile/200/> and the tag for
the relevant extension.
- format=xml will now reversibly mangle tag and attribute names that are
not valid XML, instead of just outputting invalid XML.
- Previously-announced breaking changes to log entry parameter
formatting, that are not actually part of this general result formatting
change but were made at about the same time.
With formatversion=2, we can make some useful changes:
- Return booleans as boolean true instead of empty-string. Where
appropriate,[1] return boolean false instead of omitting the property.
- Return empty objects in JSON as {}, rather than [].
- Have action=query's "pages" be an array, instead of an object with
page ids as keys that can be difficult to iterate.
- Provide useful property names instead of '*'.
- Eliminate useless indirection, e.g. {"text":"..."} instead of
{"text":{"*":"..."}} and {"key1":"value1","key2":"value2"} instead of
[{"name":"key1","*":"value1"},{"name":"key2","*":"value2"}].
If you see missed opportunities to make the above changes in existing
formatversion=2 output, or if there are other changes that would make API
output easier to use in JSON, please let me know! Phabricator
<https://phabricator.wikimedia.org/> would be ideal (tag with #MediaWiki-API
<https://phabricator.wikimedia.org/project/profile/200/>, and the
appropriate extension's tag if applicable), or reply on the mediawiki-api
mailing list <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api>.
Thanks.
[1]: Where the property is usually false, it's sometimes just bloat to
include it.
--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api-announce mailing list
Mediawiki-api-announce(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce