Anderson Green
Anderson Green

Reputation: 31800

Obtain the source of a MediaWiki page programmatically

Is it possible to obtain the source of a MediaWiki page programmatically? I'd like to write a function that does the following (in Java-like pseudocode):

public static String getWikiText(articleURL){
//return the source of the page as wiki markup
}

Upvotes: 2

Views: 98

Answers (1)

Tgr
Tgr

Reputation: 28160

Send a HTTP request with action=raw. (You could use the API as well, but that is more complicated.)

Upvotes: 3

Related Questions