Lineups.com 上的表格是什么格式以及如何在 R 中抓取它
我是抓取新手,并已成功从这些网站抓取表格:-
https://www.numberfire.com/nba/daily-fantasy/daily-basketball-projections/guards
https://www.dailyfantasyfuel.com/nba/projections/draftkings/
https://www.sportsline.com/nba/expert-projections/simulation/
但是这个网站:-
似乎非常棘手。
1.我尝试将其读取为 JSON
r <- read_html('https://www.lineups.com/nba/nba-fantasy-basketball-projections/' ) %>% html_element('script#__NEXT_DATA__') %>% html_text() %>% jsonlite::parse_json()
2.来自 rvest
方法
data <- "https://www.lineups.com/nba/nba-fantasy-basketball-projections" %>%
read_html %>%
html_nodes('script') %>%
html_text()
3.以及RSelenium
,但没有成功。
您能告诉我如何处理在“www.lineups.com”上找到的这些类型的表吗?
谢谢
I am new to scraping and have successfully scraped tables from these websites:-
https://www.numberfire.com/nba/daily-fantasy/daily-basketball-projections/guards
https://www.dailyfantasyfuel.com/nba/projections/draftkings/
https://www.sportsline.com/nba/expert-projections/simulation/
But this website:-
https://www.lineups.com/nba/nba-fantasy-basketball-projections
seems very tricky.
1. I have tried to read it as JSON
r <- read_html('https://www.lineups.com/nba/nba-fantasy-basketball-projections/') %>% html_element('script#__NEXT_DATA__') %>% html_text() %>% jsonlite::parse_json()
2. from rvest
methods
data <- "https://www.lineups.com/nba/nba-fantasy-basketball-projections" %>%
read_html %>%
html_nodes('script') %>%
html_text()
3. As well as RSelenium
but with no success.
Could you kindly tell me how to deal with these kinds of Tables found at "www.lineups.com" ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用RSelenium
Using
RSelenium