如何在 window.scrollTo() 之外滚动页面
How to scroll page apart from window.scrollTo()
我有一个测试作业,要求我解析 Spotify 播放列表以获取一些信息(艺术家、专辑、歌曲名称和持续时间)。 我不允许使用 Spotify API。到目前为止,我已经设法检索到所需的信息,但我只有前 100 条记录。 JavaScript 的 window.scrollTo()
由于某种原因在 open.spotify.com (just try it in your browser), and I can't find any other way to fully load the page. Here 上不起作用 open.spotify.com (just try it in your browser), and I can't find any other way to fully load the page. Here 是我正在使用的 Spotify 播放列表,它包含 931 首歌曲
感谢 Ryano 提供实际答案。 Spotify 页面可以通过触发来向下滚动
document.getElementsByClassName('os-viewport')[1].scrollTo(0, document.getElementsByClassName('os-viewport')[1].scrollHeight)
我有一个测试作业,要求我解析 Spotify 播放列表以获取一些信息(艺术家、专辑、歌曲名称和持续时间)。 我不允许使用 Spotify API。到目前为止,我已经设法检索到所需的信息,但我只有前 100 条记录。 JavaScript 的 window.scrollTo()
由于某种原因在 open.spotify.com (just try it in your browser), and I can't find any other way to fully load the page. Here 上不起作用 open.spotify.com (just try it in your browser), and I can't find any other way to fully load the page. Here 是我正在使用的 Spotify 播放列表,它包含 931 首歌曲
感谢 Ryano 提供实际答案。 Spotify 页面可以通过触发来向下滚动
document.getElementsByClassName('os-viewport')[1].scrollTo(0, document.getElementsByClassName('os-viewport')[1].scrollHeight)