2
I’m applying a injection in the web browser address bar, on the page of a video on youtube, in which I want to extract the date of the post of the same.
If we open this link we see a div similar to this:

When selecting the date of posting and then use the "View Selection Source" tool available in the web browser itself, we can see the source code of the selected line:

In possession of the class name watch-time-text, I tried to do the following:
javascript:postado=document.getElementsByClassName("watch-time-text").innerHTML; alert(postado);
And the following occurred:

Why is this undefined even the element existing on the page?
Because a gif is worth a thousand words

Of course, I thank you! And look that now worked with your tip. Get my upVote followed by the Absolute Vow. And again my thanks.
– Diego Henrique
Always nice to be able to help =)
– Jéf Bueno