Last modified: 2011-04-14 15:13:24 UTC
Code such as: http://en.wikipedia.org/w/index.php?title=Byte&action=raw works, but not: http://en.wikipedia.org/w/index.php?title=Byte#Meaning&action=raw Any chance?
http://en.wikipedia.org/w/index.php?title=Byte&action=raw§ion=1
(In reply to comment #1) > http://en.wikipedia.org/w/index.php?title=Byte&action=raw§ion=1 > ok, you where a bit too fast here :) Roan: get on IRC ffs!
Apologies for reopening, the request being that at present you need a lookup of "section name" -> "section number" to get the raw text of a section. The request wasn't that you cannot get the raw of a section if you know the section number; it's that if you are passed a section name it's much harder to get the raw text of it, and the natural syntax "title=PAGE#SECTION&action=raw" would be useful if easy. Again sorry for reopening, but thinking perhaps the question was misunderstood.
That's because the # is a reserved character. You're right that there should be a way to retrieve sections by name. The syntax you're suggesting can't be used, however.
Section lookups by name should be possible from the parsed output; I'm not sure offhand if we have that much detail conveniently in an array in the output object or if that'll have to be added.
This could potentially be done by first getting the section tree through the API (see http://lists.wikimedia.org/pipermail/mediawiki-api/2008-January/000334.html ), then requesting the section's content by number (action=raw§ion=3).