JavaScript:网站删除数据表时,网站过滤时不要更改网站元素中的任何内容
我正在此网站上的“评分领导者”表中删除数据: http://www.saahl.ca/leagues/stats_hockey.cfm?clientid=6601&
;通过检查表。问题是我还想刮擦前几年数据。您可以使用网站上表上方的下拉菜单选择前几年,然后出现在屏幕上。但是,当您选择上一年时,URL不会改变,也没有任何内部检查(我可以看到)。 HTML元素的内部文字发生了变化,但我无法识别。
有什么办法可以隔离一些不同的东西以瞄准刮擦?
I am scraping the data from the "Scoring Leaders" table on this website: http://www.saahl.ca/leagues/stats_hockey.cfm?clientid=6601&leagueid=30336
I've successfully scraped the data using JS, having identified the #leaders ID on the elements in the table through Inspect. The trouble is that I want to also scrape previous years data. You can select previous years using the dropdown menu above the table on the site and they show up on screen. However, when you select a previous year, the URL doesn't change, nor does anything inside inspect (that I can see). The inner text of the HTML elements changes, but nothing else that I can identify.
Is there any way to isolate something different for the scrape to target?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在下拉列表中使用选定的值作为标识符,
然后删除2021/2022 U15常规季的数据:
NOW TRS [0]包含:
您更改选择中的值到2020/2021 U15常规季:
您的查询要比以前相同:
现在TRS [0]包含:
You could use the selected value in the dropdown as identifier
You go to the url and scrape the data for 2021 / 2022 U15 Regular Season:
Now trs[0] contains:
You change the value in the select to 2020 / 2021 U15 Regular Season:
You perform the same query than before:
Now trs[0] contains: