Python3 compatibility

Added Python3 compatibility: removed urllib, urllib2 and json dependencies, replaced via the requests library.