copied code from whatapi

copied code from
https://github.com/isaaczafuta/whatapi/blob/master/whatapi/whatapi.py