简体   繁体   English

使用 Python 从 web 抓取图形数据

[英]Scraping graph data from a web using Python

Is it possible to capture the graph data from a website?是否可以从网站捕获图形数据? For example the website here , has a graph.例如这里的网站,有一个图表。

I want to get the information in the chart below.我想得到下表中的信息。

Is is possible to capture these data using Python code?是否可以使用 Python 代码捕获这些数据?

在此处输入图像描述

I wrote this code but I couldn't progress.我写了这段代码,但我无法进步。 I couldn't find the part with the graph.我找不到带有图表的部分。

import requests
from bs4 import BeautifulSoup
URL='http://www.mahallemistanbul.com/MahallemSEGE_/'
page=requests.get(URL)
soup=BeautifulSoup(page.content,'html.parser')

Any help would be much appreciated!任何帮助将非常感激!

The datas you are looking for are coming for an external resource .您正在寻找的数据来自外部资源

They are not in the html query showed, but are integrated in the page through javascript.它们不在 html 查询中显示,而是通过 javascript 集成在页面中。

You would need to get the raw datas from this other resource (check the network tab of your browser) or use an emulator such as:您需要从其他资源中获取原始数据(检查浏览器的网络选项卡)或使用模拟器,例如:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM