不会出错,但数据不会加载

时间:2018-06-12 07:04:56

标签: r web-scraping

我不明白我做错了什么:

int countSelfIntersections(PMesh &pm)
{
    vcg::tri::UpdateTopology<PMesh>::FaceFace(pm);
    std::vector<PFace *> intersections;
    bool SelfIntersect = tri::Clean<PMesh>::SelfIntersections(pm, intersections);
    tri::UpdateSelection<PMesh>::FaceClear(pm);

    for (std::vector<PFace*>::iterator it = intersections.begin(); it != intersections.end(); it++)
    {
        PFace *face = *it;
        face->SetS();
    }

    PMesh::FaceIterator f;
    f = pm.face.begin();
    std::vector<PFace*> sf;
    for (; f != pm.face.end(); ++f)
    {
        if (f->IsS())
        {
            sf.push_back(&(*f));
        }
    }

    return sf.size();
}

我想从网址中提取表格并将其放入数据框进行绘图。

1 个答案:

答案 0 :(得分:1)

如果您没有点击“获取数据”按钮,网页中没有ID为“historicalData”的表格。

url <- "https://www.nseindia.com/live_market/dynaContent/live_watch/get_quote/getHistoricalData.jsp?symbol=MRF&series=EQ&fromDate=undefined&toDate=undefined&datePeriod=1day"
finance <- read_html(url) %>%
  html_nodes(xpath = '//table')%>%
  html_table()
finance <- finance[[1]]

我认为此代码可以帮助您。您可能需要调整网址中的有效负载以获得所需的结果。

相关问题