【问题标题】:Web scraping from JSP in R [duplicate]从 R 中的 JSP 抓取网页 [重复]
【发布时间】:2020-11-29 06:37:20
【问题描述】:

我正在尝试将表从 link 提取到 R 中。 该表是过去 24 个月 SBIN 的股票价格。这是original site.

我尝试按照herehere 的建议使用RSeleniumhttr 包,但无法提取表格。

【问题讨论】:

    标签: r web-scraping httr rselenium


    【解决方案1】:

    您可以通过rvest获取数据。

    library(rvest)
    url <- 'https://www1.nseindia.com/products/dynaContent/common/productsSymbolMapping.jsp?symbol=sbin&segmentLink=3&symbolCount=1&series=ALL&dateRange=24month&fromDate=&toDate=&dataType=PRICEVOLUMEDELIVERABLE'
    
    url %>% 
      read_html %>% 
      html_table() %>%
      .[[1]] -> result
    
    result
    

    【讨论】:

      猜你喜欢
      • 2020-03-09
      • 2020-07-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-17
      • 2017-02-27
      • 1970-01-01
      相关资源
      最近更新 更多