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
Hi everyone,
ATM I’m fiddeling around with a little enigma (for me). − I hope some
one can help me … :-)
# I wanna do
Moving a page as a bot (written in PHP) with api.php without leaving a
redirect.
# the problem
I can move the page. − But the parameter "noredirect" (value = 1) seems
to be ignored. So every moved page exists with the redirect after moving …
# my guess
I guess there is something not correct with the (implementation of the)
user right "suppressredirect" (which is required for using the API
parameter "noredirect"; see [0]).
[0] <https://www.mediawiki.org/wiki/API:Move#Parameters>
# my conditions
## MW
* v1.27.3
## the bot
* I created a bot with my main account.
* the bot can do everything (edit, query, …) so far
* the bot is listed in the group "bot"
## /includes/DefaultSettings.php
L 5076: "$wgGroupPermissions['bot']['suppressredirect'] = true;"
# one more point
If I query the API (api.php) for the moved page with the parameters
* prop=contributors
* titles=$MYPAGENAME
* pcrights=suppressrevision
I get empty (= no) contributors − so my bot has not the correct right …
I hope you can give me a hint how I can accomplish such a basic task.
Thanks a lot in advance and best regards
Kai
Hi,
my software uses sub- and super- category enumeration while trying to avoid
hidden categories. There's no problem with sub-
(?action=query&prop=categories&titles=....&clshow=!hidden), but there's no
corresponding parameter for super-categories (
?action=query&list=categorymembers&cmtitle= ... ). Is there a way to avoid
contradictory states when both are used? Or maybe to achieve hidden
avoiding for super-categories some other way?
I asked about this four years ago, but not at the list (
https://www.mediawiki.org/wiki/Topic:Ra34est5vsl7fxdc), no answers at the
time, probably something changed since then or someone would give me some
workaround
Thanks in advance,
Max
Previously, it was possible to access the api via urls like:
* https://en.wikipedia.org/w/api.php/Some_text_here?action=query&titles=...
* https://www.wikidata.org/w/api.php/ (Plus some POST data)
etc.
Due to a security issue in certain browsers, we are no longer allowing
any text to be between "api.php" and the ?. If anything is there you
will get a 301 redirect to the url with the extraneous text removed.
Hopefully this doesn't cause any inconvenience to anyone.
Sincerely,
Brian Wolff
Hullo,
The Reading Web team are currently considering working on T74546: Strip
<br> tags from extracts [0]. Ideally, we'd simply enable this
transformation by default and not put it behind a flag or require a new
parameter to disable it. Would this affect anyone's current usage of the
HTML extracts returned by the TextExtracts API (prop=extracts)?
-Sam
[0] https://phabricator.wikimedia.org/T168328
--
Software Engineer, Wikimedia Foundation
IRC (Freenode): phuedx
Matrix: @phuedx:matrix.org
Timezone: BST (UTC+1)
In the action API, there are two ways to parse a page/revision: using
action=parse, or using the rvparse parameter to action=query&prop=revisions.
Similarly, there are two ways to get a diff: using action=compare, or using
parameters such as rvdiffto to action=query&prop=revisions. And then
there's action=expandtemplates versus the rvexpandtemplates parameter to
prop=revisions. This is a somewhat annoying bit of code duplication.
Further, the prop=revisions versions of these features have somewhat
strange behavior. rvparse forces rvlimit=1. rvdiffto and related parameters
will sometimes output "notcached" with no way to directly handle the
situation.
This, the 'rvdifftotext', 'rvdifftotextpst', 'rvdiffto',
'rvexpandtemplates', 'rvgeneratexml', 'rvparse', and 'rvprop=parsetree'
parameters to prop=revisions are all deprecated, as are the similarly named
parameters to prop=deletedrevisions, list=allrevisions, and
list=alldeletedrevisions.
--
Brad Jorsch (Anomie)
Senior 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