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-apiOctober 2013

mediawiki-api@lists.wikimedia.org
  • 7 participants
  • 5 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

09 Jun '14
Hi, in response to bug 54607 [1], we've changed the semantics of themobileformat 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 problematicbecause 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 bemobile-friendly", regardless of value. And the output structure willbe the same. For compatibility with older callers,mobileformat=(html|wml) will be special-cased to return the olderstructure at least for 6 month from now. These changes will startbeing rolled out to the WMF sites starting from tomorrow, TuesdayOctober 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=...&mobileformatSame 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]])
2 2
0 0

24 Oct '13
Hi, All,I have known that when the language link of an article changes(i.e. changefromwikidata.org) we will get an "external" update.Here I have a question:Does the "external" update include more cases except for the change oflanguage link. i.e. How about the changes fromcommons.wikimedia.org, thetemplate changes and the image file changes?Thanks,Ethan Liu
4 5
0 0
NAVER -http://www.naver.com/--------------------------------------------김종범(jongbeom.kim(a)nhn.com) 님은 현재 부재중입니다.</br>보내신 메일 <[Mediawiki-api] About the "external" update in the recent change list> 은 저장되어 있으므로 다시 보내실 필요는 없습니다.</br>김종범(jongbeom.kim(a)nhn.com) 님이 남기신 메시지 입니다.--------------------------------------------오늘 개인사유로 자리를 비웁니다.<br>긴급한 내용은 김웅섭 팀장님께 말씀 부탁드립니다<br><br>감사합니다.--------------------------------------------
1 0
0 0
Results per page:

[8]ページ先頭

©2009-2026 Movatter.jp