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 everyone,
When using generators is there any way to get the pages element to
be an array?
For example the next json [1]:
{
"query": {
"pages": {
"827359": {
"pageid": 827359,
"ns": 0,
"title": "mean-spirited"
},
"2216064": {
"pageid": 2216064,
"ns": 0,
"title": "mean air mhean"
}
}
}
}
What I'm looking for is this:
{
"query": {
"pages": [
{
"page": {
"pageid": 827359,
"ns": 0,
"title": "mean-spirited"
}
},
{
"page": {
"pageid": 2216064,
"ns": 0,
"title": "mean air mhean"
}
}
]
}
}
If I format it as xml [2] the "pages" element has "page"
sub-elements and the "pageid" is an attribute to those. I would expect
json to behave in a similar way.
Thanks,
Ramon
[1]
http://en.wiktionary.org/w/api.php?format=jsonfm&action=query&generator=all…
[2]
http://en.wiktionary.org/w/api.php?format=jsonfm&action=query&generator=all…
Good day,
You may be surprised to receive my email, my urgent need for a foreign partner has made me contact you for this issue l saw your contact and l decide to write you this message and with what I read through your profile I saw your company as standard that one can deal with.
l have a plan of coming to invest in your continent perhaps in your Field operating a very good business as a means of investment abroad. My preference is any good profit yielding business and I would appreciate any good ideas you could come up with. l will also need you to help me look for properties like home and land for sale or any other investment that is good to yield profit in your continent, l am proposal to invest the sum of amount US dollar, l need a responsible and honest person to handle this project for me because of my position at work, I am basher hammed, wealthy business presently work with my boss.
l am personal assistance to my boss, for we work together for many years hence he was the one behind all l have today, because he carry me along in all his crude oil business in rich oil countries of Africa the fund l have raised for this project come from the last deal we had six months ago the sum amount money. So what i want you to do is to mail me back to know weather you have interest to assist me about this situation and what you have in stock and for me to arrange the fund, know that all your assistance you are getting a reasonable percentage and of which you are standing as the owner of this project,
Please All I require is Your honest co-operation to enable us to see this project through, this will be executed under a legitimate arrangement that will protect us under breach of law please hold this with utmost confidential and be rest assure that this project would be most sources and profitable. i will wait for prompt respond.
thanks
basher hammed
Hi,
I am not sure this is the right place for this issue, so please redirect me
if there is a better forum.
I have been loading the wikipedia page for
India<http://en.wikipedia.org/wiki/India>programmatically as part of
testing my project. It was working fine, until
recently. Now, most of the time (but not always), loading it gives me
garbled content.
Other pages on wikipedia work fine both programmatically and from the
browser.
This particular page also loads fine from my browser (safari on mac) -
but when I load it programmatically (using curl or open-uri from mac-os x),
the content is garbled.
I am using a user agent, but don't know what changed.
I tried closing the bar on top which appeared recently (Jimmy Wales
message), but even without that bar, it seems to be garbled.
Any suggestions?
Thanks
Anand
Greetings,
Simple question: is there any way to use the MediaWiki API to find a list of
redirects *to* a given page? In other words, if I have A #REDIRECT [[B]],
can I query B and find out that A is pointing to it? Special:WhatLinksHere
does this in the normal UI, but I couldn't find a matching API query.
Cheers,
-jani
Hello all,
I use opensearch to search Wikimedia Commons for images for a search tool I
have created. The query is as follows:
http://commons.wikimedia.org/w/api.php?action=opensearch&&format=xml&namesp…
However, I find that the number of "Item" elements returned by this query is
often either 9, 10 or 11. So far it seems that the number is more or less
within this range.
Is there some sort of limit on the number of results that are fetched? How
could I get more results?
Thanks in advance,
Leena