socket.setdefaulttimeout(20) file = open(save, 'w') download = urllib2.urlopen(item).read() file.write(download) file.close()