【发布时间】:2017-11-13 02:44:09
【问题描述】:
我正在网页抓取一个页面,其中显示了各种数字,还显示了小价格图表的图像。
如果我在浏览器中单击此图像,我可以将该图表保存为 .png 图像。
当我查看源代码时,该元素在检查时看起来像这样:
<div class="performance_2d_sparkline graph ng-isolate-scope ng-scope" x-data-percent-change-day="ticker.pct_chge_1D" x-sparkline="watchlistData.sparklineData[ticker.ticker]">
<span class="inlinesparkline ng-binding">
<canvas width="100" height="40" style="display: inline-block; width: 100px; height: 40px; vertical-align: top;">
</canvas>
</span>
</div>
我有什么方法可以通过网络抓取相同的图像来保存我可以通过浏览器手动保存的图像?
【问题讨论】:
标签: python image canvas web-scraping beautifulsoup