IMPORTXML:如何从网页中抓取 NBA 徽标(使用 Google 表格)

问题描述 投票:0回答:1

网页https://www.sportslogos.net/teams/list_by_league/6/National_Basketball_Association/NBA/logos/

工具:Google 表格 功能:导入xml

查询: 我想使用 importxml 检索 NBA 徽标的链接

尝试(没有成功)

//a[@title='Atlanta Hawks Logos']/@content

//a[contains(@title,'Atlanta')]

parsing google-sheets import html-parsing
1个回答
0
投票

如果您需要基于team_name的徽标:

=image(importxml(A$1,"//*[@title='"&A2&" Logos']//img/@src"))

如果您一次性需要所有图像:

=importxml("Webpage","//img/@src")
© www.soinside.com 2019 - 2024. All rights reserved.