Movatterモバイル変換


[0]ホーム

URL:


Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview
List overview
Download

Mediawiki-apiJuly 2012

mediawiki-api@lists.wikimedia.org
  • 5 participants
  • 6 discussions
Start a nNew thread

20 Jan '26
Hi there,I'm using the API to extract the raw wiki text from my pages, usingthe "?action=query&titles=Main_Page&export&exportnowrap" syntax. Thatworks perfectly.Now I would like to get the templates expanded out in the result, so Iuse: "?action=query&titles=Main_Page&prop=revisions&rvlimit=1&rvprop=content&rvexpandtemplates",which does the job, as expected, but it also strips out the comments.My problem is that the comments are meaningful to me (I use them tohelp process the wiki text in subsequent steps).Is there a way to expand templates with the API, but leave thecomments intact?Thanks,Kevin
4 5
0 0
Need to extract abstract of a wikipedia page
by aditya srinivas 23 Nov '23

23 Nov '23
Hello,I am writing a Java program to extract the abstract of the wikipedia pagegiven the title of the wikipedia page. I have done some research and foundout that the abstract with be in rvsection=0 So for example if I want the abstract of 'Eiffel Tower" wiki page then I amquerying 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 <revxml:space="preserve"> which represents the abstract of the wikipedia page.But this wiki text also contains the infobox data which I do not need. Iwould like to know if there is anyway in which I can remove the infobox dataand get only the wikitext related to the page's abstract Or if there is anyalternative method by which I can get the abstract of the page directly.Looking forward to your help.Thanks in AdvanceAditya Uppu
4 3
0 0
Couple of questions about the search API
by Jeremy Bradshaw 27 Jul '12

27 Jul '12
eg.api.php?action=query&list=search&format=json&srsearch=igor%20stravinsky%20ballet&srprop=score%7Csnippet&srlimit=10The documentation on the score property says "Adds the score (if any) fromthe search engine". This would be a very useful property for me to get therelevance of each page to the search string, but it never seems to bereturned. Why so? Is there any way I can get the query to return it?Secondly, I'd like the option to search titles only with the addition ofthe &srwhat=title argument but whenever I try this I get the error resultcode "srsearch-title-disabled". Is this temporary or permanent? How can Isearch on titles only?
1 0
0 0
Performing a text search
by Jeremy Bradshaw 26 Jul '12

26 Jul '12
I want to search the mediawiki database and get the page with the closestmatch to my search text. For example, on entering the search string "igorstravinsky persephone" I want to get a link to this page:http://en.wikipedia.org/wiki/Pers%C3%A9phone_%28Stravinsky%29The following query/w/api.php?action=query&list=search&format=xml&srsearch=igor%20stravinsky%20persephone&srlimit=1almost gets what I want but the data returns does not include the pageid: <p ns="0" title="Perséphone (Stravinsky)" snippet="(&lt;spanclass=&#039;searchmatch&#039;&gt;Persephone&lt;/span&gt; ) is amusical work (mélodrame) for speaker, solo singers, chorus, dancersand orchestra with music by &lt;spanclass=&#039;searchmatch&#039;&gt;Igor&lt;/span&gt; &lt;spanclass=&#039;searchmatch&#039;&gt;Stravinsky&lt;/span&gt; and a&lt;b&gt;...&lt;/b&gt; " size="2500" wordcount="313"timestamp="2012-05-13T07:21:00Z" />Is this the right way to go about it? Is the title returned a unique IDwhich I can use to get more detail of the page?
3 3
0 0

18 Jul '12
Today I approved and merged a change [1] by Brad Jorsch that changesthe way continue parameters are used in some API modules. Thesechanges do not break backwards compatibility unless you were doingthings you weren't supposed to, but I figured I should announce themanyway.There were a few modules that were using continuations like<query-continue><allcategories acfrom="Foobar" /></query-continue> ;some of these were changed to use a dedicated accontinue parameterinstead of reusing acfrom (keeping acfrom, it has a legitimatepurpose). This shouldn't be a problem for clients that use values fromquery-continue verbatim and don't make any assumptions about whichparameters will be used for continuations. The following modules areaffected:* allcategories (acfrom -> accontinue)* allimages (aifrom -> aicontinue)* alllinks now consistently uses alcontinue instead of alfrom in allcases; previously, alfrom was used in some cases and alcontinue inothers* allpages (apfrom -> apcontinue)* filearchive (fafrom -> facontinue)Additionally, the values provided in query-continue will no longer benormalized for presentation, and the values read from the continueparameters will no longer be normalized for database usage. This won'tbe a problem if you're just passing query-continue values back inverbatim, but it might present problems if you were using continueparameters in hacky ways to jump to certain parts of the result. Thischange was needed to fix bug 36987[2] and bug 29290 [3]. The followingmodules and parameters are affected:* allcategories (accontinue)* allimages (aicontinue)* alllinks (alcontinue)* allpages (apcontinue)* categories (clcontinue)* deletedrevs (dlcontinue)* duplicatefiles (dfcontinue)* filearchive (facontinue)* iwbacklinks (iwblcontinue)* iwlinks (iwcontinue)* images (imcontinue)* langbacklinks (lblcontinue)* links (plcontinue)* templates (tlcontinue)* watchlistraw (wrcontinue)This change will be deployed as part of the 1.20wmf8 deployment. Thiswill be deployed to different wikis on different days over the courseof the next two weeks, see the deployment schedule [4].Roan[1]https://gerrit.wikimedia.org/r/#/c/8407/[2]https://bugzilla.wikimedia.org/show_bug.cgi?id=36987[3]https://bugzilla.wikimedia.org/show_bug.cgi?id=29290[4]https://www.mediawiki.org/wiki/MediaWiki_1.20/Roadmap#Schedule_for_the_depl…_______________________________________________Mediawiki-api-announce mailing listMediawiki-api-announce(a)lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
2 1
0 0

17 Jul '12
Hi,I just subscribed because I'm interested in mirroring a few Mediawiki installations where I'm contributing. Do you know of any well maintained and stable software that already implements a read-only mirroring service and that I could install on my own server?Thank you,Thomas Koch,http://www.koch.ro
1 0
0 0
Results per page:

[8]ページ先頭

©2009-2026 Movatter.jp