from wikitables import import_tables
import json
import os
tables = import_tables('List of cities in Italy')
print tables
data = tables[0].json()
with open('airlines.json', 'w') as f:
json.dump(data, f, indent=4)
The latest release provides some updates to table parsing. Please provide any applicable error messages and your local wikitables version if the issue persists.
I'm using this library with python 2.7 using this article https://en.wikipedia.org/wiki/List_of_airline_codes but int doesn't work