0

I'm using Bliki-core (version-3.1.0) to access a wikipedia page with the the title "Web service" for my test case. My code is below

String[] listOfTitleStrings = { "Web service" };
User user = new User("", "", "https://en.wikipedia.org/w/api.php");
user.login();
List<Page> listOfPages = user.queryContent(listOfTitleStrings);
for (Page page : listOfPages) {
    WikiModel wikiModel = new WikiModel("${image}", "${title}");
    String html = wikiModel.render(page.toString());
    System.out.println(html);
}

When i access the URL:

http://en.wikipedia.org/w/api.php? format=xml&action=query&titles=Web%20service&prop=revisions&rvprop=content

I can see the xml output. But when I run my java code i get the following output

<p>Page{ns=0, title=Web service, id=93483, links=[], categories=[],
editToken=&#39;null&#39;, imageUrl=&#39;null&#39;, imageThumbUrl=&#39;null&#39;, 
missing=false, invalid=false, revision=info.bliki.api.Revision@74e46064}</p>

What am I missing here?

Thanks

4

1 回答 1

0

将 bliki-core 版本更改为早期版本 3.0.19 解决了该问题。

于 2018-06-02T12:46:35.843 回答