# Trying to use HTML node to get text other then text in \<span\>

**URL:** <https://discourse.nodered.org/t/trying-to-use-html-node-to-get-text-other-then-text-in-span/33699>\
**Category:** General\
**Created:** [3 October 2020 14:33 UTC](https://discourse.nodered.org/t/trying-to-use-html-node-to-get-text-other-then-text-in-span/33699 "2020-10-03T14:33:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![4\_fools](https://avatars.discourse-cdn.com/v4/letter/4/f6c823/32.png) [@4\_fools](https://discourse.nodered.org/u/4_fools)\
**Post date:** [3 October 2020 14:33 UTC](https://discourse.nodered.org/t/trying-to-use-html-node-to-get-text-other-then-text-in-span/33699/1 "2020-10-03T14:33:43Z")

</div>

trying to use this tutorial

> **[Simple GET request : Node-RED](https://cookbook.nodered.org/http/simple-get-request)**

but the thing i am tring to get isnt in .span.node-red-latest-version  
it is in some like a.node-red-latest-version for example but it seems like the HTML node automatically adds the .span and the HTML node just takes in what ever is after that as a  
n input

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 October 2020 14:51 UTC](https://discourse.nodered.org/t/trying-to-use-html-node-to-get-text-other-then-text-in-span/33699/2 "2020-10-03T14:51:55Z")

</div>

Can you post a screenshot of the html node config and what you see in the debug please. You can paste a screenshot here directly.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [3 October 2020 21:54 UTC](https://discourse.nodered.org/t/trying-to-use-html-node-to-get-text-other-then-text-in-span/33699/3 "2020-10-03T21:54:25Z")

</div>

> [@4\_fools](#):
>
> it seems like the HTML node automatically adds the .span and the HTML node just takes in what ever is after that as a  
> n input

The HTML node does not automatically add a .span. It just does what you tell it to.

The current version of the Node-RED web site's home page has the version number here:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/a/8a31ec5818bf311b0371b88a7028f2155258d5b4.png)

So it really is in a span. However, that is not relevant since the element has a unique class name.

The only selector you need is `.node-red-latest-version`

I just tested that and it correctly returned the version number.

---

<div class="post-metadata">

**Author:** ![4\_fools](https://avatars.discourse-cdn.com/v4/letter/4/f6c823/32.png) [@4\_fools](https://discourse.nodered.org/u/4_fools)\
**Post date:** [4 October 2020 01:58 UTC](https://discourse.nodered.org/t/trying-to-use-html-node-to-get-text-other-then-text-in-span/33699/4 "2020-10-04T01:58:19Z")

</div>

![1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/4/a482c4dafdadca0be1259bf2dd01f59d64124eee.png)

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/b/ebe547f4c9d15e28fad10be3d58fc7582e9c76c9.png)

i tried all combinations of with the .div without each individual phone number and the column

```auto
[{"id":"df3a2045.decdf","type":"html","z":"92c3b0e.26b935","name":" #2","property":"","outproperty":"","tag":"div.row.pl-md-3","ret":"attr","as":"single","x":810,"y":1540,"wires":[["82116663.166398"]]},{"id":"82116663.166398","type":"html-to-text","z":"92c3b0e.26b935","name":"","x":950,"y":1540,"wires":[["8406ac6.b7c615"]]},{"id":"8406ac6.b7c615","type":"debug","z":"92c3b0e.26b935","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1090,"y":1540,"wires":[]},{"id":"d5113804.f10b28","type":"http request","z":"92c3b0e.26b935","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://www.truepeoplesearch.com/details?streetaddress=139%20marshall%20road&citystatezip=01420&rid=0x0","tls":"","persist":false,"proxy":"","authType":"","x":670,"y":1540,"wires":[["df3a2045.decdf"]]},{"id":"1592f0af.42084f","type":"inject","z":"92c3b0e.26b935","name":"","props":[{"p":"f","v":"f","vt":"str"}],"repeat":"","crontab":"00 07 * * *","once":false,"onceDelay":0.1,"topic":"","x":510,"y":1540,"wires":[["d5113804.f10b28"]]}]

```

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 October 2020 13:22 UTC](https://discourse.nodered.org/t/trying-to-use-html-node-to-get-text-other-then-text-in-span/33699/5 "2020-10-04T13:22:27Z")

</div>

You can't use the class names there because they aren't unique. `div.row.pl-md-3` might not be unique either. However, if you use just `.pl-md-3` you will get an array output and you might be lucky and have only a single entry.

If you do chose that div though, you will still need to drill down further if you are wanting the phone numbers.

Without being able to see the whole HTML, I can't give you a more accurate response.

The real problem here is that you haven't explained what you are trying to do and what kind of page you are looking at nor exactly what you want to get. I can only assume that you got the example from the cookbook working.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 December 2020 13:22 UTC](https://discourse.nodered.org/t/trying-to-use-html-node-to-get-text-other-then-text-in-span/33699/6 "2020-12-03T13:22:32Z")

</div>

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