MediaWikiBot b = new MediaWikiBot("http://yourwiki.org"); b.login("Username", "Password"); System.out.println(b.readContent("Main Page").getText());How to find the correct wikiurl
The correct wikiurl is sometimes not easy to find, because some wikiadmis uses url rewriting rules. In this cases the correct url is the one, which gives you access to api.php
. E.g. Compare
http://www.mediawiki.org/wiki/api.php http://www.mediawiki.org/w/api.phpThus the correct wikiurl is:
http://www.mediawiki.org/w/
@author Thomas Stock
@author Tobias Knerr
@author Justus Bisser
@see MediaWikiAdapterBot
|
|