bcicen/wikitables

Dealing with Different Template Types

Closed this issue · 2 comments

Template types cannot be resolved properly.

To reproduce:
The first table of https://en.wikipedia.org/wiki/An-Nabek_District cannot extract the area number correctly.

The "Coaching Staff" table of https://en.wikipedia.org/wiki/Al-Ahli_SC_(Amman) cannot resolve the flags properly.

I am currently using the Wikipedia API to expand the specific templates and then re-parsing it.

Let me know if if you think there is a better solution.

currently _read_template provides rudimentary parsing, mostly for pulling out quantities.

Replacing this method with an API call to expand the templates and parse the result sounds like the best solution, as there are far more templates than wikitables could possibly anticipate or handle locally.

Support for basic templates (change, flag) and default behavior of using the template argument as field value is now available in the latest release