我正在尝试从以下URL获取图像:
image_url = http://www.eatwell101.com/wp-content/uploads/2012/11/Potato-Pancakes-recipe.jpg?b14316
当我在浏览器中访问它时,它看起来像是一张图片。但是当我尝试时却出现了错误:
import urllib, cStringIO, PIL
from PIL import Image
img_file = cStringIO.StringIO(urllib.urlopen(image_url).read())
image = Image.open(img_file)
IOError: 无法识别图像文件
我以前用这种方法复制了数百张图片,所以我不确定这里有什么特殊之处。我能拿到这张图片吗?