如何用scrapy抓取交互式图表? [英] How to scrape an interactive charts with scrapy?
本文介绍了如何用scrapy抓取交互式图表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 scrapy
来抓取和抓取网页.
I'm using scrapy
to scrape and crawl webpages.
我对如何抓取这个很感兴趣 页面.如您所见,有几个图表.但是当我查看源代码时,即使我在 标签中搜索,我也找不到这些点的值.
I am interested in how to scrape this page. As you can see there are several charts. But when I look at the source code, I do not find the values of the points, even when I search in the <script>
tags.
如何抓取每个图表,x
作为小时,y
作为奇数的值?
How can I scrape each chart, with x
as hour, and y
as value of the odd?
Scrapy 版本:1.5.2
Scrapy version: 1.5.2
推荐答案
数据在您的网页上.签入script
标签变量var cote_data_1
、var cote_data_2
等.它们应该可以在没有JS的情况下使用.
Data is on your webpage. Check in script
tag variables var cote_data_1
, var cote_data_2
, etc. They should be available without JS.
这篇关于如何用scrapy抓取交互式图表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文