私信  •  关注

Chetan Vashisth

Chetan Vashisth 最近创建的主题
Chetan Vashisth 最近回复了
4 年前
回复了 Chetan Vashisth 创建的主题 » 如何使用用于python的Wikipedia API获取图像标题

尝试:

如果您正在遍历所有图像的url,则可以尝试

for i in wiki.images:
    i.split('/')[-1]  # -1 because the name is at the last part of the url

所以上面的代码会给你图像名。

希望这有帮助。。。