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
Hello,
I've been trying to have my user remotely sign-in through my
laravel/react site, but I've been reaching a dead-end.
After reading this post from 2017 :
https://laracasts.com/discuss/channels/general-discussion/single-sign-on-me…
I've followed the step for method 2 from:
https://www.mediawiki.org/wiki/API:Login
I've request a login token with the api with a "GET" call of
"/api.php?action=query&format=json&meta=tokens&type=login"
and received for example:
"97b2edb716fa7b13f2955c79e7f8f0205ceda2c6+\\"
Then I "POST" the result with the formData provided: (I am 100% sure
those credentials are valid as I can use them to login)
1.
action:
clientlogin
2.
username:
TestUser
3.
password: ********
4.
loginrequests:
5.
loginmessageformat:
wikitext
6.
loginreturnurl:
http://localhost:3000/
7.
logintoken:
f90d08a1b279a521d24a4f629b678bb35ceda63d+\
8.
format:
json
The response that I get back is:
{"warnings":{"main":{"*":"Unrecognized parameters: username,
password."}},"clientlogin":{"status":"FAIL","message":"The supplied
credentials could not be
authenticated.","messagecode":"authmanager-authn-no-primary"}}
What am I missing to correctly remote login a user?
Any help would be appreciated.
Daniel
Hi,
For one of my projects, I need to be able to keep the most up to date
version of wikipedia html pages for a few languages like en, zh, de, es, fr
etc. So this is done currently in two steps,
1. Listen to changes on stream API documented here
<https://wikitech.wikimedia.org/wiki/Event_Platform/EventStreams> and then
extract the page titles.
2. For each of the titles, get the latest HTML using the Wikipedia REST api
<https://en.wikipedia.org/api/rest_v1/#/Page%20content/get_page_title__title_>
and
persist the HTML.
I understand that in order to avoid the 429 (Too many requests error), we
need to make sure we limit the api request to 1 per second. Just wanted to
check if we can make requests to different languages like en.wikipedia.org,
fr.wikipedia.org etc in parallel or do those requests also need to be done
in serial manner (1 per second), in order to not hit HTTP 429 error.
Please let me know if you need more information.
--
Regards,
Aadithya
--
Sent from my iPad3