Not getting expected results from wikipedia by using Bliki

90 Views Asked by At

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

1

There are 1 best solutions below

0
On BEST ANSWER

Changing version of bliki-core to an earlier version 3.0.19 fixed the issue.