javascript - 用百度 echarts 实现的图表,如何通过python+selenium 获取页面显示的数据?
高洛峰
高洛峰 2017-04-11 12:11:13
0
1
1872

我打算用 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>

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

Antworte allen(1)
黄舟

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

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!