wiki
wiki copied to clipboard
Include article url in most viewed list
I tried most viewed
function, it returned an Array of title
and viewCount
.
I sent the title of returned value, and got the error No article found
.
I think it is better to send the wiki link along with title
and viewCount
Could you please provide an example with code and expected/actual results?
I think you are running into the issue of looking up Special
pages in Wikipedia.
I tried the same thing and it works just fine.
wiki()
.mostViewed()
.then(data => {
const title = data[2].title;
return wiki()
.page(title)
.then(pg =>
pg.info().then(info => {
info.birthPlace.should.equal('Manhattan');
info.name.should.equal('Ronnie Spector');
})
);
});