简体   繁体   English

无法获取所有元素

[英]Can't get all elements

https://www.whoscored.com/Regions/252/Tournaments/2/Seasons/6335/Stages/13796/Fixtures/England-Premier-League-2016-2017 https://www.whoscored.com/Regions/252/Tournaments/2/Seasons/6335/Stages/13796/Fixtures/England-Premier-League-2016-2017

Trying to capture the ID of every item with "Match Report" (//*[@id="tournament-fixture"]/tbody/tr[2]/td[7]/a[1]) . 尝试使用“匹配报告” (//*[@id="tournament-fixture"]/tbody/tr[2]/td[7]/a[1])来捕获每个项目的ID。 I can access the visible one's through the source code but the site uses Incapsula, so I am unable to use requests and I'm currently using selenium. 我可以通过源代码访问可见对象,但是该站点使用Incapsula,因此我无法使用请求,并且当前正在使用硒。 I want to access the previous months and when I press the back button it reloads the previous fixtures but the source code doesn't update. 我想访问前几个月,当我按下“后退”按钮时,它会重新加载以前的灯具,但是源代码不会更新。

Does anyone know anyway to either get the source code (DataStore.prime) in the previous month using selenium or how to submit a successful requests to gather all fixtures from this particular season? 无论如何,有人知道使用硒获取上个月的源代码(DataStore.prime)还是如何成功提交请求以收集该特定季节的所有固定装置?

No need to use selenium, you can access the month data through the url in Chrome Dev tools: 无需使用硒,您可以通过Chrome Dev工具中的url访问月份数据: 在此处输入图片说明

https://www.whoscored.com/tournamentsfeed/13796/Fixtures/?d=201611&isAggregate=false

?d is the year+month, than you get all the data in a list, the first value is id , and you can get Match Report through the id : ?d是年+月,那么您将获得列表中的所有数据,第一个值为id ,则可以通过id获得Match Report

https://www.whoscored.com/Matches/1080595/MatchReport
                                  ^^^^id^^

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM