dijs / wiki

Wikipedia Interface for Node.js
MIT License
315 stars 61 forks source link

Getting table information from Wiki doesn't work. #94

Closed divanvb closed 5 years ago

divanvb commented 5 years ago

I'm trying to get table data from the wiki but I've got no idea why that data is not being returned. I've looked around but also couldn't find any information regarding it or how to do it.

Do you have any suggestions as I'm looking to essentially scrape the data from the table and store it for later use in an application.

dijs commented 5 years ago

Could you give me the particular page you are referencing?

divanvb commented 5 years ago

https://cod-esports.gamepedia.com/Team_Envy

@dijs You'll notice there are a few tables with tabs etc on them as well with information that I'd like to grab from the Wiki.

https://cod-esports.gamepedia.com/Category:North_American_Teams

The ^ above URL shows a table with region tabs/categories but I'm also unable to obtain them.

divanvb commented 5 years ago

Any update on this perhaps?

dijs commented 5 years ago

I'm sorry, this fell off my radar somehow... I will look into this right now. I'm sure I just need to improve the parsing to include table data. Thanks for the ping!

divanvb commented 5 years ago

Cool thank you, I appreciate the quick response.

dijs commented 5 years ago

Added support for this.

in version v4.11.0

Check out this test for an example of how to use it: https://github.com/dijs/wiki/blob/eab09769abe5af06d6e588f401d653b021487fc7/test/real.js#L223

divanvb commented 5 years ago

Cool thanks, will have a look and let you know how it goes.

divanvb commented 5 years ago

Using the test example, I get the following error: Property 'tables' does not exist on type 'Page'

dijs commented 5 years ago

Are you sure you are using the new version? On Thu, Jan 3, 2019 at 12:52 PM divanvb notifications@github.com wrote:

Using the test example, I get the following error: Property 'tables' does not exist on type 'Page'

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/dijs/wiki/issues/94#issuecomment-451110568, or mute the thread https://github.com/notifications/unsubscribe-auth/ABsTXuD28XSaapLidRSx_22_3GqhYj2Cks5u_eDsgaJpZM4ZTT0z .

divanvb commented 5 years ago

Yeah I am, I made new issues with regards to this.