Air Quality component with data taken from web

It would be great if someone could implement Air quality data from aqicn.org
They provide some widgets: http://aqicn.org/faq/2015-07-28/air-quality-widget-new-improved-feed/ but I don’t know if they can be embedded into home assistant.
There is no api except some map related api: http://aqicn.org/faq/2015-09-18/map-web-service-real-time-air-quality-tile-api/

The whole data retrieval is being done via some javascript do I don’t know if it can be used in HA at all.

This seems pretty cool. I would imagine it would be very similar to once of the weather components.

Python Scrapers are already built…

I’ve written simple python scrapper myself and set rgb led according to level but I don’t think scrapping is a best way to do it.
Aqi.cn provides widgets that you can embed withing page. They have some javascript that retrieves the data and displays it. My idea here would be to use what AQI gives as it won’t cause any problems on their side while automatic scrapping can cause some server overloads.
Anyway the code AQI provides is quite simple to paste but I don’t think we have a container in HA that we can use to embed it.
Problem would be that we wouldn’t be able to react to air quality data as we wouldn’t have the value available just displayed ex. couldn’t turn off ventilation when pollution outside would be too high.

Yeah … That’s why scraping seems to me as the only available option. Without putting the values into variables that can then be used for automation, the value begins to lessen. You can scrape and then parse the widget page which gives a very short concise response. It’s surprising that they don’t have an open API to grab values considering the amount of data they have.

Lack of usable API is strange but I assume that for some reason they want users to go to their page or at least reference to it.
What is strange I couldn’t find any valid source of similar information with public API available. At least not in Europe.
I even wrote a request to one of polish government agencies to provide such api or at least some RSS, XML feed or whatever. They replied they do not provide such service. They do provide historical data in CSV file formats but not current values. It’s nice but it’s the current values that matter for us now not historical ones.
I have no idea why it’s like that, maybe they are afraid of abusing such data or servers.

All the sites retrieve data using some javascript codes to display in on the their page.