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
Hi, All,
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="
sf9t03wg27tl73nnde3jzfuxncefux9" img_timestamp="2014-01-05T11:09:36Z"/>
<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="
q84abqjr2n4bmn7o6j4uovpl5ufs2gq" img_timestamp="2014-01-05T11:09:37Z"/>
The first one has no page id but the second one has.
Does anybody can tell me the differences?
Thanks,
Ethan Liu
Hi, in response to bug 54607 [1], 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 ===
api.php?action=parse&format=xml
{
"parse": {
"title": "...",
"text": {
"*": "foo"
}
}
}
api.php?action=parse&format=json
<?xml version="1.0"?>
<api>
<parse title="..." displaytitle="...">
<text xml:space="preserve">foo</text>
</parse>
</api>
=== Parse that outputs mobile HTML, old style ===
api.php?action=parse&format=json&mobileformat=html
{
"parse": {
"title": "API",
"text": "foo"
}
}
api.php?action=parse&format=xml&mobileformat=html
<?xml version="1.0"?>
<api>
<parse title="..." text="foo" displaytitle="...">
</parse>
</api>
=== Parse that outputs mobile HTML, new style ===
api.php?action=parse&format=...&mobileformat
Same as for non-mobile parses.
== FAQ ==
Q: I didn't use mobileformat before, does anything change for me?
A: No.
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.
-----
[1] https://bugzilla.wikimedia.org/show_bug.cgi?id=54607
--
Best regards,
Max Semenik ([[User:MaxSem]])
Dear Wiki Team,
Greetings!
We are starting a travel based website where users can create their own
Itinerary and thus for the same would like to inquire about Wikipedia's
policies and process for gaining access to the List of attractions API .
The content thus shown from Wikipedia, if clicked will redirect the
customer to the Deep Link page of the same point of interest.
Any heads up will provide beneficial for us.
Thanks.
Warm Regards,
Ekta Tejwani
On Mar 27, 2014 11:39 PM, "Brian Wolff" <bawolff(a)gmail.com> wrote:
>
>
> On Mar 27, 2014 10:23 PM, "Liu Chenheng" <liuchenheng(a)gmail.com> wrote:
> >
> > Hi, All,
> >
> > I found some "upload" changes missed page id:
> >
> >
http://commons.wikimedia.org/w/api.php?action=query&format=xml&continue=&li…
> >
> > <rc type="log" ns="6" title="File:Doña Luz Saviñon de Saviñon -
Personalidsades de Las Calles de la Colonia del Valle en Mexico
D.F..JPG"pageid="0" revid="0" old_revid="0" rcid="121543911"
user="Mrtabachnik" oldlen="0" newlen="0"
timestamp="2014-03-26T22:52:15Z" comment="User
created page with
UploadWizard" logid="83703391" logtype="upload" logaction="overwrite"
img_sha1="9f5cptv556268ehsgio0akc3ld0ftau"img_timestamp="2014-03-26T22:52:14Z"/>
> >
> > The page id was 0. I'm wondering whether it's a bug?
> >
> > Thanks.
> > Chenheng Liu
> >
> > _______________________________________________
> > Mediawiki-api mailing list
> > Mediawiki-api(a)lists.wikimedia.org
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
> >
Files affected by bug 32551 will have no page id in logs. Older uploads
(although this upload does not seem old enough) will also have no page id
in logs
-bawolff
Hi, All,
I found some "upload" changes missed page id:
http://commons.wikimedia.org/w/api.php?action=query&format=xml&continue=&li…
<rc type="log" ns="6" title="File:Doña Luz Saviñon de Saviñon -
Personalidsades de Las Calles de la Colonia del Valle en Mexico D.F..JPG"
pageid="0" revid="0" old_revid="0" rcid="121543911" user="Mrtabachnik"
oldlen="0" newlen="0" timestamp="2014-03-26T22:52:15Z" comment="User
created page with UploadWizard" logid="83703391" logtype="upload" logaction
="overwrite" img_sha1="9f5cptv556268ehsgio0akc3ld0ftau"img_timestamp="
2014-03-26T22:52:14Z"/>
The page id was 0. I'm wondering whether it's a bug?
Thanks.
Chenheng Liu
I've applied to the Outreach Program for Women internship this summer,
intending to clean up API::Client Code by evaluating the listed API
client libraries and contributing to one of the best of those. My
proposal is here
(https://www.mediawiki.org/wiki/Evaluating_MediaWiki_web_API_client_libraries)
and my microtask is here
(https://www.mediawiki.org/wiki/API:Client_Code/Access_Library_Comparison).
If you have comments on my proposal or emphatic opinions about your
favorite API libraries, I'd love to hear them.
-Frances
---------- Forwarded message ----------
From: Sumana Harihareswara <sumanah(a)wikimedia.org>
Date: Sun, Mar 23, 2014 at 5:07 PM
Subject: Re: [Wikitech-l] OPW applicant introduction
To: Wikimedia developers <wikitech-l(a)lists.wikimedia.org>
I've had the privilege of meeting Frances and very much hope that I get
to mentor and teach her (along with Tollef, Brad, and Merlijn) this
year. I think her microtask
https://www.mediawiki.org/wiki/API:Client_Code/Access_Library_Comparison
is a reasonable start at evaluating how complete, well-documented, and
easy-to-use the Python client libraries are. If you've noticed
idiosyncrasies in any of those libraries, I'd like to know so we can
mark them for further investigation and possible fixing!
I developed the basic idea for this internship project along with RobLa,
Quim, and Frances, and I think it's pretty sound. The list of client
libraries has been a bit of a mess for a while now, and I look forward
to being able to Officially Recommend some libraries, and work with
their maintainers more systematically (as Frances will in the last part
of her internship, when she improves one of them).
Frances, it would be great if you'd cross-post this thread to the
MediaWiki API mailing list
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api so developers
there can check out your work and talk about their favorite libraries.
Thanks!
--
Sumana Harihareswara
Senior Technical Writer
Wikimedia Foundation
On 03/19/2014 07:36 AM, Frances Hocutt wrote:
> I have updated my microtask [1] and my status page [2] with the last
> week's work, and my application [3] is complete.
>
> -Frances
>
> [1] https://www.mediawiki.org/wiki/API:Client_Code/Access_Library_Comparison
> [2] https://www.mediawiki.org/w/index.php?title=User:Fhocutt#Status
> [3] https://www.mediawiki.org/wiki/Evaluating_MediaWiki_web_API_client_libraries
>
> On Tue, Mar 18, 2014 at 3:03 AM, Frances Hocutt
> <frances.hocutt(a)gmail.com> wrote:
>> I have updated and expanded the scope of my OPW project [1],
>> Evaluating and Improving MediaWiki Web API Client Libraries. Thanks to
>> Sumana, Tollef, and Brad for their help!
>>
>> -Frances
>>
>> [1] https://www.mediawiki.org/wiki/Evaluating_MediaWiki_web_API_client_libraries
>>
>> On Fri, Mar 14, 2014 at 12:20 AM, Frances Hocutt
>> <frances.hocutt(a)gmail.com> wrote:
>>> Hello!
>>>
>>> My name is Frances Hocutt, and I'm applying for the OPW internship
>>> program. Specifically, I'm interested in improving the documentation
>>> around the available Mediawiki API libraries, writing specifications for what
>>> makes a good one, and generally making API:Client Code a more useful page.
>>> I've been coordinating my application with Sumana Harihareswara, and my co-
>>> mentor will be Tollef Fog Heen. Brad Jorsch and Merlijn van Deen have
>>> agreed to offer technical advice as well. Thanks to everyone!
>>>
>>> You can find my userpage here:
>>> https://www.mediawiki.org/wiki/User:Fhocutt. I've been drafting my
>>> proposal here: https://www.mediawiki.org/wiki/Evaluating_MediaWiki_web_API_client_libraries
>>> (working title). And I've started a page for my microtask here:
>>> https://www.mediawiki.org/wiki/API:Client_Code/Access_Library_Comparison.
>>> I'll be comparing two of the Python API libraries; right now I'm figuring out
>>> what criteria I'll be using. I'm looking at the Google Android, Drive, and
>>> Youtube API documentation along with the AWS S3 Ruby API as starting
>>> examples. Are there any other API client libraries that you've found exemplary,
>>> related to Wikimedia or not?
>>>
>>> Looking forward to contributing,
>>>
>>> Frances Hocutt
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Hello everyone ,
I am very new to the mediawiki-api . I am planning on using this to
extract geo - information about places . I have been referring to this
tutorial by scraper wiki
https://blog.scraperwiki.com/2011/12/how-to-scrape-and-parse-wikipedia/ .
Though I am not sure if I should be using this api or the offline dump ,
and what is the difference between the two data sets ? I need to parse a
lot of data (the articles as well as extract the geo-coordinates of places
) . Please help me out with this . Thank you !
--
Radhika Gaonkar
Final year B.E.( Hons) Computer Science
BITS Pilani K. K . Birla Goa Campus
Hi,
Yesterday, a user reported having problem with my tool, WPCleaner, getting
error messages "assertuserfailed - Assertion that the user is logged in
failed" when trying to save pages.
I also got them a few minutes ago, restarted the tool, and the problem was
gone.
Has there been any modification on the API or MW that can explain this
error message ?
I'm pretty sure I haven't changed anything in the way I use the API, so I'm
wondering what's the cause.
Nico
[1] https://en.wikipedia.org/wiki/Wikipedia:WPCleaner
Hi,
I'm new to the api and this list, but I really appreciate that it's there.
I'm trying to create what I thought would be a simple query: "List all
recent changes of all pages, but don't show anon, minor or bot changes"
In particular, I want the pageid, page title and userid associated with
each change. Nice to have pre/post page size too. I've got the query
working in my codebase, and on the wikimedia api sandbox:
https://www.mediawiki.org/wiki/Special:ApiSandbox#action=query&list=recentc…
But even with what I think is the correct "rcshow" values, I still get anon
edits - both in the sandbox and on the live
site<https://en.wikipedia.org/w/api.php?action=query&list=recentchanges&format=j…>
.
In fact in some ways it seems like I'm *only* seeing anon posts. Any
thoughts as to what's going on? Am I misunderstanding how the API works?
Thanks for any input!
Steve