>  Q&A  >  본문

javascript - 用百度 echarts 实现的图表,如何通过python+selenium 获取页面显示的数据?

我打算用 python+selenium 实现对下图中各个数值的捕获。可是现在一头雾水,不知如何能定位到目标元素。
谁给帮帮忙给点建议。

 <p id="chart" class="echarts_pie" _echarts_instance_="1487904212096" style="-webkit-tap-highlight-color: transparent; user-select: none; background-color: rgba(0, 0, 0, 0); cursor: default;">
    <p style="position: relative; overflow: hidden; width: 782px; height: 470px;">
        <p data-zr-dom-id="bg" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 782px; height: 470px; user-select: none;"></p>
        <canvas width="782" height="470" data-zr-dom-id="0" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 782px; height: 470px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
        <canvas width="782" height="470" data-zr-dom-id="1" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 782px; height: 470px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
        <canvas width="782" height="470" data-zr-dom-id="_zrender_hover_" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 782px; height: 470px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
    </p>
 </p>

高洛峰高洛峰2748일 전1876

모든 응답(1)나는 대답할 것이다

  • 黄舟

    黄舟2017-04-11 12:13:13

    估计是不可以的。。这个是用canvas渲染出来的。。你可以看看请求中,应该有echarts的配置数据。

    회신하다
    0
  • 취소회신하다