Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.info() returns wrong data #170

Open
yolpsoftware opened this issue Apr 2, 2022 · 2 comments
Open

.info() returns wrong data #170

yolpsoftware opened this issue Apr 2, 2022 · 2 comments

Comments

@yolpsoftware
Copy link

I use the following code:

import wiki from 'wikijs';

// ...

const page = await wiki().page("Thirty Years' War");
const info = await page.info();

This is the result:

image

Results with the fullInfo command is similar.

There are several issues:

  • Several results just have a "Sfn" or "Efn" string. Not sure what that means.
  • All the combatant data is unusable.
  • commander2 data is incomplete.

I isn't clear to me if the infobox-parser package is included in wikijs. According to the docs, the two packages are separate, but apparently wikijs parses the infobox anyway.

Can I use infobox-parser together with wikijs?

@yolpsoftware
Copy link
Author

@dijs no problem if you don't have time to fix this, but can you please answer my question?

@dijs
Copy link
Owner

dijs commented Nov 7, 2022

Sorry for the long delay. infobox-parser is the parsing engine used by wikijs.

As far as the parsing mistakes, there could be many reasons why this isn't working perfectly. Wiki page sources are notoriously hard to parse... which is why I made this in the first place.

I will use this page in a unit test for infobox-parser and try to fix the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants