# My first time to use html parser

**URL:** <https://discourse.nodered.org/t/my-first-time-to-use-html-parser/75917>\
**Category:** General\
**Created:** [1 March 2023 09:21 UTC](https://discourse.nodered.org/t/my-first-time-to-use-html-parser/75917 "2023-03-01T09:21:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![makerstorage](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/makerstorage/32/57594_2.png) [@makerstorage](https://discourse.nodered.org/u/makerstorage)\
**Post date:** [1 March 2023 09:21 UTC](https://discourse.nodered.org/t/my-first-time-to-use-html-parser/75917/1 "2023-03-01T09:21:18Z")

</div>

Hi,

It is my first time to use html parser. I am trying to get:

Binance Adds BNX, YFI & More Pairs on Cross Margin & Isolated Margin

html part:

```auto
<div data-bn-type="text" class="css-f94ykk">Binance Adds BNX, YFI &amp; More Pairs on Cross Margin &amp; Isolated Margin<h6 data-bn-type="text" class="css-eoufru">2023-03-01</h6></div>

```

my selector in html parser is : div.css-f94ykk  
but the result is empty.

source:[New Cryptocurrency Listing | Binance Support](https://www.binance.com/en/support/announcement/new-cryptocurrency-listing?c=48&navId=48)

Thanks for the help in advance.  
Regards,  
Nuri

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [2 March 2023 12:23 UTC](https://discourse.nodered.org/t/my-first-time-to-use-html-parser/75917/2 "2023-03-02T12:23:29Z")

</div>

Hello .. the data seem to be in a script tag with id `__APP_DATA` before being populated with javascript to the divs. So the `css-f94ykk` selector doesnt return anything because the divs dont exist at that time.

After parsing the json you can find what you need in `msg.payload.routeProps.ce50.catalogs[0].articles`

Here is how i managed to get them

```auto
[{"id":"b68a67f5ebfd6110","type":"inject","z":"54efb553244c241f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":1700,"wires":[["22eb2d3563a89555"]]},{"id":"22eb2d3563a89555","type":"http request","z":"54efb553244c241f","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://www.binance.com/en/support/announcement/new-cryptocurrency-listing?c=48&navId=48","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":410,"y":1700,"wires":[["d3dbe4b9258cdd30"]]},{"id":"d3dbe4b9258cdd30","type":"html","z":"54efb553244c241f","name":"","property":"payload","outproperty":"payload","tag":"#__APP_DATA","ret":"html","as":"single","x":600,"y":1700,"wires":[["ec9ac7ab851b8035","7c1bbe929e5b418e"]]},{"id":"209d8b8f4d3ad74a","type":"debug","z":"54efb553244c241f","name":"debug 29","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":960,"y":1700,"wires":[]},{"id":"ec9ac7ab851b8035","type":"debug","z":"54efb553244c241f","name":"debug 30","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":1620,"wires":[]},{"id":"7c1bbe929e5b418e","type":"function","z":"54efb553244c241f","name":"parse JSON","func":"msg.payload = JSON.parse(msg.payload[0].replace(/&quot;/g, '\"'))\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1700,"wires":[["209d8b8f4d3ad74a"]]}]

```

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

---

<div class="post-metadata">

**Author:** ![makerstorage](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/makerstorage/32/57594_2.png) [@makerstorage](https://discourse.nodered.org/u/makerstorage)\
**Post date:** [2 March 2023 13:32 UTC](https://discourse.nodered.org/t/my-first-time-to-use-html-parser/75917/3 "2023-03-02T13:32:49Z")

</div>

WOW!  
Just WOW. You did it man.  
Thanks for this great support. 5star.

---

<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:** [16 March 2023 13:33 UTC](https://discourse.nodered.org/t/my-first-time-to-use-html-parser/75917/4 "2023-03-16T13:33:17Z")

</div>

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