dijs / infobox-parser

Parse Wikipedia Infoboxes
40 stars 18 forks source link

Missing data #27

Closed maxwell8888 closed 3 years ago

maxwell8888 commented 4 years ago

I am trying to get the infobox for various companies. I tried the below for deliveroo, but the results from infobox-parser are missing some of the data returned by the wikipedia API

const url =  "https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=Deliveroo&rvsection=0";
const infoBox = await fetch(url).then(res => res.json());
const data = parseInfo(JSON.stringify(infoBox));

where data contains:

{ general:
   { founder: 'Will Shu',
     hqLocation: 'London',
     areaServed: 'Unbulleted list',
     keyPeople: 'Chief executive officer',
     products: '\\n',
     revenue: 'As of',
     website: 'oweb}}\\n' },
  tables: [],
  bsTables: null,
  lists: [] }

however the wikipedia API returns lots of extra information like

industry = {{Unbulleted list|[[Online food ordering]]|[[Food delivery]]}}

using:

"infobox-parser": "^3.4.1",
dijs commented 3 years ago

Fixed and released in v3.4.2