y
is the url http://statseeker/graphs/ping.jc-4050-1.delay.1405951106.png
. This is a internal website. When trying to save this PNG file this is the error it throws. I have not been able to find any info of even where to start. I want to be able to save it as whatever I want.
Someone please advise. I have asked many questions on here any almost all go unanswered. I don't know where else to turn.
data1 = urllib2.urlopen(y).read()
g = 'test.png'
urllib2.urlopen(data1).write(g)
Output
http://statseeker/graphs/ping.jc-4050-1.delay.1405951106.png
Traceback (most recent call last):
File "JacksonShowAndSave1.py", line 46, in <module>
urllib2.urlopen(data1).write(g)
File "C:\Python27\lib\urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "C:\Python27\lib\urllib2.py", line 396, in open
protocol = req.get_type()
File "C:\Python27\lib\urllib2.py", line 258, in get_type
raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: ëPNG