I have a wmv file at a particular url that I want to grab and save as a file using Python. My script uses urllib2 to authenticate and read the bytes and save them locally in chunks. However, once I open the file, no video player recognizes it. When I download the wmv manually from a browser, the file plays fine, but oddly enough ends up being about 500kb smaller than the file I end up with using Python. What's going on? Is there header information I need to somehow exclude?
From what I understand, urllib works at the HTTP level and should properly remove headers in subsequent chunks. I took a look at the data returned by read() and it's all bytes.
Downloading wmv from a url in Python 2.6