Python : App Transport Security has blocked a cleartext HTTP

Add this code to your python code after the import AppKit

AppKit.NSBundle.mainBundle().infoDictionary()['NSAppTransportSecurity'] = dict(NSAllowsArbitraryLoads = True)