See this add-on on the kodi.tv showcase
Packed for KODI from https://github.com/kennethreitz/requests