> hi, i want to automate some tasks of gathering photos from web, i tried
> urllib/urllib2, both ended up without much success (saved gifs with
> only a border, nothing else)..
> the code i used was:
> >>> data = urllib2.urlopen(
> >>> #was looking through cookbook, so i used that as a sample image
> >>> data = data.read()
> >>> file = open("f:/test.gif", "w")
Since you appear to want to write binary data, you should use 'wb', not
'w', as the "mode".