dijs / wiki

Wikipedia Interface for Node.js
MIT License
313 stars 62 forks source link

No output for Infobox #95

Closed GitterHubber closed 5 years ago

GitterHubber commented 5 years ago

Node version v10.14.2 OS Windows 7, 64bit

I'm doing

const wiki = require("wikijs").default
wiki().page('Copper').then(page => page.info()).then(console.log)

But output returns empty.

I just want the name value pairs from the info box, currently I'm not worried about the advance features like links, images, tables etc. in the infobox.

Just the name/value pairs would do.

dijs commented 5 years ago

Yep, I noticed that. I am working on a fix which I will hopefully release later today.

GitterHubber commented 5 years ago

So I installed wikijs again using

npm install wikijs

But I still get the empty output.

dijs commented 5 years ago

I haven't pushed the new version yet. Gimme a sec

dijs commented 5 years ago

Okay, done. try v4.10.2

GitterHubber commented 5 years ago

Okay, this is good, it works. Just another niggle. This is a snapshot from wikipedia

image

And this is the output window image

Now the original window shows name as Density but wikijs outputs it as DensityGpcm3nrt. Looks like the names and the units have been merged. Shouldn't the units have been on the value side instead of being merged with the names?

Also units are missing from the values For eg. the orginal

Vickers hardness | 343–369 MPa and output is vickersHardness: '343-369'