如何根据 Yahoo Fantasy Football 的下拉列表提取前一周的数据

How to extract data of previous week based on drop down from the Yahoo Fantasy Football

嗨,我正在使用 Yahoo Fantasy Football,我设计了 Google Sheet 来获取得分数据,工作正常。 link 到 sheet 如下。

Google Sheet Link

我已经更改了编辑权限。我制作了一个下拉列表,其中包含周数信息。基本上,我的想法是通过选择周数来填充来自 yahoo fantasy football 的数据。为了导入数据,我正在使用这个命令。

=importhtml("https://football.fantasysports.yahoo.com/f1/683375","table",1)

并且此命令运行良好。 我使用相同的命令进行了尝试,但它不适用于周数。页面来源如下

所以根据给定的图片,这是周数,我想通过使用下拉菜单在 google sheet 中实现相同的数字。我已经实现了下拉菜单,但它不起作用。当我从下拉列表中选择周时,是否有一种方法可以使用脚本或命令从 google sheet 中插入 link 相关数据?请看一下上面给出的Google Sheet。我也遇到这个错误,虽然它之前工作正常,但如何解决它。

谢谢

IMPORTHTML cannot retrieve elements dynamically inserted by a script. In your case the content on Week matchups is inserted dynamically and therefore will not be retrieved (it will return empty). Moreover, IMPORTHTML olny gets data from tables or lists and if you inspect what it seemed to be a table in Week Matchup is just actually a series of divs. If the content would not be inserted dynamically, to get the data from these divs you would need to use IMPORTXML.

如果您仍想检索此信息,恐怕您需要寻找其他网络抓取技术。