AttributeError: '<invalid type>' object has no attribute 'read' on
If I try to use urllib2, the console shows:
NotImplementedError: urllib2 is not yet implemented in Skulpt on line 1
Any ideas how I can achieve reading URL content from Skulpt?
Thanks
import urllib.request
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources on a web page to be requested from another domain outside the domain from which the first resource was served.
import urllib.request
my_file = urllib.request.urlopen("CORS-enabled-HTTPS-URL-here")
print my_file.read()