title: error in downloading a gif picture from url python
body: <p>I want to download on disk the gif image:</p>
  
  <p><a href="http://www.portaportese.it/telefono/es_2014043024395.gif" rel="nofollow">http://www.portaportese.it/telefono/es_2014043024395.gif</a></p>
  
  <p>with all the codes I found out around for downloading pictures, I end up with a error in the final saved picture such as:</p>
  
  <p>GIF image was truncated or incomplete.</p>
  
  <p>in a few words the picture is not being saved correctly. </p>
  
  <p>Is there anybody able to provide a correct solution which will download this picture on disk?</p>
  
  <p>Any code returns an empty image.. I tried this:</p>
  
  <pre><code>import urllib2
  
  picture_page = "http://www.portaportese.it/telefono/es_2014043024395.gif"
  opener1 = urllib2.build_opener()
  page1 = opener1.open(picture_page)
  my_picture = page1.read()
  filename = "my_image.gif"
  fout = open(filename, "wb")
  fout.write(my_picture)
  fout.close()
  </code></pre>