Scraping graph data from a web using Python

Viewed 40

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?

enter image description here

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!

1 Answers

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.

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 :

Related