beautifulsoup get wikitables from wikipedia to CSV

Install following packages:

pip install requests
pip install beautifulsoup

Add your desired URL for the following line
urllib2.urlopen('http://en.wikipedia.org/wiki/List_of_universities_in_India?limit=%s&query=%s' % (2, 'seedterm'))

Run file
python wiki.py

A file India.csv is created with tables in the csv format.