【发布时间】:2020-08-26 20:44:23
【问题描述】:
我有一个图像 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)
【问题讨论】:
标签: python image ipython jupyter