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
Thanks so much Brian for your detailed answer, thanks to you I'm starting to understand something !
Viviana
________________________________
Da: Mediawiki-api <mediawiki-api-bounces(a)lists.wikimedia.org> per conto di mediawiki-api-request(a)lists.wikimedia.org <mediawiki-api-request(a)lists.wikimedia.org>
Inviato: domenica 29 aprile 2018 14:00
A: mediawiki-api(a)lists.wikimedia.org
Oggetto: Mediawiki-api Digest, Vol 129, Issue 2
Send Mediawiki-api mailing list submissions to
mediawiki-api(a)lists.wikimedia.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
or, via email, send a message with subject or body 'help' to
mediawiki-api-request(a)lists.wikimedia.org
You can reach the person managing the list at
mediawiki-api-owner(a)lists.wikimedia.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Mediawiki-api digest..."
Today's Topics:
1. Wikimedia API redirect 301 (viviana paga)
2. Re: Wikimedia API redirect 301 (bawolff)
----------------------------------------------------------------------
Message: 1
Date: Sat, 28 Apr 2018 14:33:29 +0000
From: viviana paga <viviana.paga(a)hotmail.it>
To: "mediawiki-api(a)lists.wikimedia.org"
<mediawiki-api(a)lists.wikimedia.org>
Subject: [Mediawiki-api] Wikimedia API redirect 301
Message-ID:
<DB6PR06MB3128D1B493601C07A5FF46C5E48C0(a)DB6PR06MB3128.eurprd06.prod.outlook.com>
Content-Type: text/plain; charset="windows-1252"
Hi everyone,
I'm developing an Ajax webservice that query Wikimedia Api Service, but I get a very strange behavior; in fact my query sometimes works perfectly and sometimes doesn't work at all (301 internal redirect) .
This is the response by the server: X-Cors-Redirect-1: 301 https://commons.wikimedia.…metadata&sroffset=0&callback=?
Could you help me to understand why or what I miss in my code?
This is my code :
$.ajaxPrefilter(function (options) {
if (options.crossDomain && jQuery.support.cors) {
const https = (window.location.protocol === 'http:' ? 'http:' : 'https:');
options.url = https + '//cors-anywhere.herokuapp.com/' + options.url;
}
if ( !options.beforeSend) {
options.beforeSend = function (xhr) {
xhr.setRequestHeader('Api-User-Agent', 'OpenArtImages/Beta (http://localhost:8080; viviana.paga(a)hotmail.it; Wikipedia User: Vivsss)');
xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
xhr.setRequestHeader('Origin', 'http://localhost:8080');
xhr.setRequestHeader('Strict-Transport-Security', 'max-age=106384710; includeSubDomains; preload');
xhr.withCredentials = true;
}
}
});
firstRequest = $.get( 'https://commons.wikipedia.org/w/api.php?origin=*&action=query&list=search&f…:'+inputWord+incategory+'+fileh:>600& &prop=imageinfo|pageids|titles&srnamespace=6&rawcontinue=&srinfo=totalhits|suggestion&srlimit='+limit+'&iiprop=timestamp|user|url|size|sha1|mime|metadata'+offset+'&callback=?',
function (response) {
///// ........ I get Data ......... /////
}
Thank you so much,
Viviana Paga
Hi everyone,
I'm developing an Ajax webservice that query Wikimedia Api Service, but I get a very strange behavior; in fact my query sometimes works perfectly and sometimes doesn't work at all (301 internal redirect) .
This is the response by the server: X-Cors-Redirect-1: 301 https://commons.wikimedia.…metadata&sroffset=0&callback=?
Could you help me to understand why or what I miss in my code?
This is my code :
$.ajaxPrefilter(function (options) {
if (options.crossDomain && jQuery.support.cors) {
const https = (window.location.protocol === 'http:' ? 'http:' : 'https:');
options.url = https + '//cors-anywhere.herokuapp.com/' + options.url;
}
if ( !options.beforeSend) {
options.beforeSend = function (xhr) {
xhr.setRequestHeader('Api-User-Agent', 'OpenArtImages/Beta (http://localhost:8080; viviana.paga(a)hotmail.it; Wikipedia User: Vivsss)');
xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
xhr.setRequestHeader('Origin', 'http://localhost:8080');
xhr.setRequestHeader('Strict-Transport-Security', 'max-age=106384710; includeSubDomains; preload');
xhr.withCredentials = true;
}
}
});
firstRequest = $.get( 'https://commons.wikipedia.org/w/api.php?origin=*&action=query&list=search&f…:'+inputWord+incategory+'+fileh:>600& &prop=imageinfo|pageids|titles&srnamespace=6&rawcontinue=&srinfo=totalhits|suggestion&srlimit='+limit+'&iiprop=timestamp|user|url|size|sha1|mime|metadata'+offset+'&callback=?',
function (response) {
///// ........ I get Data ......... /////
}
Thank you so much,
Viviana Paga
Cross-post. Please see below.
Thanks!
-Adam
P.S. MWStake will be contacted under separate cover from Cindy.
---------- Forwarded message ----------
From: Edward Galvez <egalvez(a)wikimedia.org>
Date: Wed, Apr 4, 2018 at 5:37 PM
Subject: Wikimedia contributors survey is here: share your feedback
Hi everyone,
The Wikimedia Foundation is asking for your feedback in a survey. We want
to know how well we are supporting your work on and off wiki, and how we
can change or improve things in the future. The opinions you share will
affect the current and future work of the Wikimedia Foundation.
If you are volunteer developer, and have contributed code to any pieces of
MediaWiki, gadgets, or tools, please complete the survey. It is available
in various languages and will take between 20 and 40 minutes to complete.
*Follow this link to the Survey:* https://wikimedia.qualtrics.
com/jfe/form/SV_5ABs6WwrDHzAeLr?aud=DEV
If you have already seen a similar message on Phabricator, Mediawiki.org,
Discourse, or other platforms for volunteer developers, please don't take
the survey twice.
You can find more information about this survey on the project page
<https://meta.wikimedia.org/wiki/Community_Engagement_Insights/About_CE_>
and see how your feedback helps the Wikimedia Foundation support
contributors like you. This survey is hosted by a third-party service and
governed by this privacy statement
<https://wikimediafoundation.org/wiki/Community_Engagement_Insights_2018_Sur…>.
Please visit our frequently asked questions page
<https://meta.wikimedia.org/wiki/Community_Engagement_Insights/Frequently_as…>
to find more information about this survey.
Feel free to email me directly with any questions you may have.
Thank you!
Edward Galvez
--
Edward Galvez
Evaluation Strategist, Surveys
Learning & Evaluation
Community Engagement
Wikimedia Foundation