I made a script to download the file, but it only works on Unix / Linux / OSX when I load binary executables, swf, images, etc.
\
import sys
if sys.version_info<(2,8):
import urllib as request
else:
import urllib.request as request
x=request.urlopen("http://homestarrunner.com/intro.swf")
y=x.read()
x.close()
z=open("intro.swf","w")
z.write(y)
z.close()
I will get the file and the usual unreadable garbage in the file, but it will be unreadable.
It seems that binaries always have such problems on Windows. Why is this?
PS. How can I write my Python code so that it loads?
source
share