我有一个图像url列表,想用Jupyter显示它们。
由于一个图像可以,因此在列表上循环时不显示图像:
liste_images = ['http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=447344&type=card',
'http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=450248&type=card',
'http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=447345&type=card',
'http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=450252&type=card',
'http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=469854&type=card',
'http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=466953&type=card',
'http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=469851&type=card',
'http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=461108&type=card',
'http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=461109&type=card',
'http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=461107&type=card']
我尝试的方式是:
import requests
from IPython.display import Image
for url_image_carte in liste_images:
Image(requests.get(url_image_carte).content)