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.
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
I found in some of the UPLOAD update, there is no page id:
<rc type="log" ns="6" title="File:Lucian A. Sperta- Nunez.jpg" rcid="
114549183" pageid="0" revid="0" old_revid="0" user="Azarel63"oldlen="0"
newlen="0" timestamp="2014-01-05T11:09:38Z" comment="User created page with
UploadWizard" logid="77242320" logtype="upload"logaction="upload" img_sha1="
<rc type="log" ns="6" title="File:Gingerbread spices (annotated).jpg" rcid="
114549185" pageid="30485540" revid="0" old_revid="0"user="SKopp" oldlen="0"
newlen="0" timestamp="2014-01-05T11:09:37Z" comment="User created page with
UploadWizard" logid="77242318"logtype="upload" logaction="upload" img_sha1="
The first one has no page id but the second one has.
Does anybody can tell me the differences?
Hi, in response to bug 54607 , we've changed the semantics of the
mobileformat parameter to action=parse
== Summary ==
Previously, it used to accept strings 'html' or 'wml', later just
'html' and modify the structure of output (see below). This was problematic
because you needed to retrieve the HTML from output in different ways,
depending on whether mobileformat is specified or not. Now,
mobileformat is a boolean parameter, that is if there's a 'mobileformat'
parameter in request, it will be treated as "the output should be
mobile-friendly", regardless of value. And the output structure will
be the same. For compatibility with older callers,
mobileformat=(html|wml) will be special-cased to return the older
structure at least for 6 month from now. These changes will start
being rolled out to the WMF sites starting from tomorrow, Tuesday
October 24th and this process will be complete by October 31st.
== Examples ==
=== Non-mobile parse ===
<parse title="..." displaytitle="...">
=== Parse that outputs mobile HTML, old style ===
<parse title="..." text="foo" displaytitle="...">
=== Parse that outputs mobile HTML, new style ===
Same as for non-mobile parses.
== FAQ ==
Q: I didn't use mobileformat before, does anything change for me?
Q: I use mobileformat=html, will my bot/tool be broken now?
A: No, you will have 6 months to switch to new style.
Q: I'm only planning to use mobileformat, what should I do?
A: Just use the new style.
Q: How did this format discrepancy appear in the first place?
A: To err is human.
Max Semenik ([[User:MaxSem]])
Gerrit change 107389 adds RevDel support to various API query modules,
so for example a user with the 'deletedhistory' right will be able to
retrieve the user and summary from prop=revisions.
This will cause some changes:
- list=deletedrevs, list=filearchive, list=recentchanges, and
list=watchlist formerly would not return any information at all for entries
where any field was revision-deleted. These entries will now be returned.
"hidden" indicators will be provided as is done for modules such as
- prop=imageinfo, list=logevents, prop=revisions, and list=usercontribs
will now return field values in addition to the "hidden" indicators, if the
user has the necessary user rights.
- When "hidden" indicators are returned, a new indicator "suppressed"
may also be returned to indicate whether suppression was activated.
- prop=imageinfo will now return info for revision-deleted files.
- list=logevents, when searching by user or title, will no longer skip
revisions where the user or title was revision-deleted if the requesting
user has the deletedhistory right.
- list=usercontributions will now look at the correct user rights
(deletedhistory and suppressrevision, not hideuser) to determine whether to
hide revision-deleted contributions.
All clients should be updated to expect rows with hidden fields for
deletedrevs, filearchive, recentchanges, and watchlist, and clients with
advanced permissions should be updated to properly handle (and to not
publicly reveal) the data for revision-deleted fields from these modules as
well as imageinfo, logevents, revisions, and usercontribs.
These changes will be deployed to WMF wikis with 1.23wmf11, see
https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.
Brad Jorsch (Anomie)
Mediawiki-api-announce mailing list
My name is Max, and i'm iOS developer. I want make "random article" button for iOS. But i don't understand, how does wikipedia random article works. How can i made it? And how can i made random, only in one category? Has article id data about category, or this data are contained in individual properties?
I am Diwanshi Pandey, an OPW intern working on the project
"Completing mediawiki API development course on Codecademy" . I have
completed Parsing and Querying aspects of API but stuck with Modifications
as i don't have required permissions.
The link to the course:
I was trying to get an edit token but there was a warning saying:
"Unrecognized value for parameter 'intoken': edit"
The reason of this issue is certainly because of "callback" parameter.
I have also filed a bug as the above warning is unclear.
In my course, I want to cover getting a token , editing a page , add a page
to watchlist , etc but not deleting a page.
I am blocked by this isuue.
Does anybody know some other way to code it? or Can someone guide me
through some other process?
On Tue, Jan 14, 2014 at 5:47 AM, Xia Zhang <xiazhang(a)google.com> wrote:
> From you previous email. You have a QA instance
> I have another question: How frequent you update the QA instance? Is it a
> reliable/final QA instance before pushing it to production instance? Or
> still involves in some bug-fix-cycle to the QA?
beta.wmflabs.org is updated continuously as changes are merged into the git
Brad Jorsch (Anomie)
The AssertEdit extension has long been installed on WMF wikis,
allowing bots to include "&assert=user" or "&assert=bot" in their
action=edit requests to prevent accidentally editing while logged out.
With Gerrit change 90263, the functionality will be included in
MediaWiki core. At the same time, the following changes will be made
to the functioning of this feature:
* Assertion will be available on all API actions, not just edit.
* Assertion failure will now be indicated by an API error, code
'assertbotfailed' or 'assertuserfailed'.
* The 'nassert' parameter will be ignored, and using it will give an
unrecognized parameter warning.
* Other assertions, such as 'true', 'false', and 'exists', will no
longer function and attempting to use them will result in an
Most clients should notice little change from this transition besides
the fact of receiving an error rather than a failure status from
This change will be rolled out with 1.23wmf10, see
https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the
Brad Jorsch (Anomie)
Mediawiki-api-announce mailing list
I'd like to be notified as soon as the API changes. A simple way is to
monitor the page http://en.wikipedia.org/w/api.php
Here is my problem:
Will the page http://en.wikipedia.org/w/api.php be always updated when the
API changes (i.e. add/remove some new params) or the format of the response
If not, are there any ways to monitor that? Thanks.