How to get some text from using Web component?

Good Afternoon

I wanted to change the website to get text from to Air Quality Forecast for New Delhi, Delhi - The Weather Channel | weather.com
I want to get this element :arrow_down:
image
I tried to use document.getElementsByClassName("AirQualityMeasurement")[0].textContent;
But I always get null
My blocks :arrow_down:

I did change the link to the new website link.

Thanks a lot!

try this code

document.getElementsByClassName("AirQualityText--measurement--3ovem AirQuality--pollutantMeasurement--1g1Ns")[0].textContent;

1 Like

I’ll try it

Tried it out. Turns out that it works perfectly. It does include quotation marks but I cut it out using some text editing!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.