# Parsing data on a html website

**URL:** <https://discourse.nodered.org/t/parsing-data-on-a-html-website/1733>\
**Category:** General\
**Created:** [21 July 2018 22:51 UTC](https://discourse.nodered.org/t/parsing-data-on-a-html-website/1733 "2018-07-21T22:51:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcmlnz91](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@gcmlnz91](https://discourse.nodered.org/u/gcmlnz91)\
**Post date:** [21 July 2018 22:51 UTC](https://discourse.nodered.org/t/parsing-data-on-a-html-website/1733/1 "2018-07-21T22:51:09Z")

</div>

hello,

i'm trying to understand how to use the html node. i have some difficulties in parsing data from a html.  
for exercise i'm trying to take some information from the website oraesattaco  
i can't take the time and more in general i have some difficuties on every attribute that change

[{"id":"13f05733.be7349","type":"http request","z":"b2f1b60c.9e0988","name":"","method":"GET","ret":"txt","url":"[https://www.oraesatta.co/","tls":"","x":1070,"y":120,"wires":[["ebdcef3b.c917d"]]},{"id":"1d24ba3b.c92936","type":"inject","z":"b2f1b60c.9e0988","name":"","topic":"trigg","payload":"gris","payloadType":"flow","repeat":"","crontab":"","once":false,"x":900,"y":120,"wires":[["13f05733.be7349"]]},{"id":"649d9b39.7a7874","type":"debug","z":"b2f1b60c.9e0988","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1470,"y":120,"wires":[]},{"id":"ebdcef3b.c917d","type":"html","z":"b2f1b60c.9e0988","name":"","property":"","outproperty":"","tag":"#top-box](https://www.oraesatta.co/%22,%22tls%22:%22%22,%22x%22:1070,%22y%22:120,%22wires%22:%5B%5B%22ebdcef3b.c917d%22%5D%5D%7D,%7B%22id%22:%221d24ba3b.c92936%22,%22type%22:%22inject%22,%22z%22:%22b2f1b60c.9e0988%22,%22name%22:%22%22,%22topic%22:%22trigg%22,%22payload%22:%22gris%22,%22payloadType%22:%22flow%22,%22repeat%22:%22%22,%22crontab%22:%22%22,%22once%22:false,%22x%22:900,%22y%22:120,%22wires%22:%5B%5B%2213f05733.be7349%22%5D%5D%7D,%7B%22id%22:%22649d9b39.7a7874%22,%22type%22:%22debug%22,%22z%22:%22b2f1b60c.9e0988%22,%22name%22:%22%22,%22active%22:true,%22tosidebar%22:true,%22console%22:false,%22tostatus%22:false,%22complete%22:%22payload%22,%22x%22:1470,%22y%22:120,%22wires%22:%5B%5D%7D,%7B%22id%22:%22ebdcef3b.c917d%22,%22type%22:%22html%22,%22z%22:%22b2f1b60c.9e0988%22,%22name%22:%22%22,%22property%22:%22%22,%22outproperty%22:%22%22,%22tag%22:%22#top-box) \> h1","ret":"html","as":"single","x":1260,"y":120,"wires":[["649d9b39.7a7874"]]},{"id":"9964e6e2.0df348","type":"http request","z":"b2f1b60c.9e0988","name":"worldonometers","method":"GET","ret":"txt","url":"[https://www.oraesatta.co/","tls":"","x":1080,"y":180,"wires":[["e4256f52.38ffe"]]},{"id":"5e816bee.94e7c4","type":"debug","z":"b2f1b60c.9e0988","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1470,"y":180,"wires":[]},{"id":"e4256f52.38ffe","type":"html","z":"b2f1b60c.9e0988","name":"","property":"","outproperty":"","tag":"#clock","ret":"text","as":"single","x":1230,"y":180,"wires":[["5e816bee.94e7c4"]]},{"id":"37f2414a.d90fbe","type":"inject","z":"b2f1b60c.9e0988","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":900,"y":180,"wires":[["9964e6e2.0df348](https://www.oraesatta.co/%22,%22tls%22:%22%22,%22x%22:1080,%22y%22:180,%22wires%22:%5B%5B%22e4256f52.38ffe%22%5D%5D%7D,%7B%22id%22:%225e816bee.94e7c4%22,%22type%22:%22debug%22,%22z%22:%22b2f1b60c.9e0988%22,%22name%22:%22%22,%22active%22:true,%22tosidebar%22:true,%22console%22:false,%22tostatus%22:false,%22complete%22:%22payload%22,%22x%22:1470,%22y%22:180,%22wires%22:%5B%5D%7D,%7B%22id%22:%22e4256f52.38ffe%22,%22type%22:%22html%22,%22z%22:%22b2f1b60c.9e0988%22,%22name%22:%22%22,%22property%22:%22%22,%22outproperty%22:%22%22,%22tag%22:%22#clock%22,%22ret%22:%22text%22,%22as%22:%22single%22,%22x%22:1230,%22y%22:180,%22wires%22:%5B%5B%225e816bee.94e7c4%22%5D%5D%7D,%7B%22id%22:%2237f2414a.d90fbe%22,%22type%22:%22inject%22,%22z%22:%22b2f1b60c.9e0988%22,%22name%22:%22%22,%22topic%22:%22%22,%22payload%22:%22%22,%22payloadType%22:%22date%22,%22repeat%22:%22%22,%22crontab%22:%22%22,%22once%22:false,%22onceDelay%22:0.1,%22x%22:900,%22y%22:180,%22wires%22:%5B%5B%229964e6e2.0df348)"]]}]

i'm able to take string data.. but i'm not able to take data that change.. i'm not sure that this is the correct way.. How i have to do?

thank you for your help

---

<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:** [22 July 2018 09:13 UTC](https://discourse.nodered.org/t/parsing-data-on-a-html-website/1733/2 "2018-07-22T09:13:29Z")

</div>

> [@gcmlnz91](#):
>
> i'm able to take string data.. but i'm not able to take data that change.. i'm not sure that this is the correct way.

You cannot access data that is calculated on the web page by javascript. The html node fetches the source of the page but does not run the javascript.

---

<div class="post-metadata">

**Author:** ![gcmlnz91](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@gcmlnz91](https://discourse.nodered.org/u/gcmlnz91)\
**Post date:** [22 July 2018 09:28 UTC](https://discourse.nodered.org/t/parsing-data-on-a-html-website/1733/3 "2018-07-22T09:28:29Z")

</div>

Thank you for your answer. Do you have any idea how I can get that calculated data? Is it possible in other way?

---

<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:** [22 July 2018 10:18 UTC](https://discourse.nodered.org/t/parsing-data-on-a-html-website/1733/4 "2018-07-22T10:18:41Z")

</div>

> [@gcmlnz91](#):
>
> . Do you have any idea how I can get that calculated data?

Not that I am aware of, other than to work out what the js is doing and replicate that in a function node for example.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [22 July 2018 10:28 UTC](https://discourse.nodered.org/t/parsing-data-on-a-html-website/1733/5 "2018-07-22T10:28:16Z")

</div>

I’ve not done it in Node-RED but if you google “scrape javascript tendered page” there are techniques using third party websites or python

---

<div class="post-metadata">

**Author:** ![gcmlnz91](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@gcmlnz91](https://discourse.nodered.org/u/gcmlnz91)\
**Post date:** [22 July 2018 10:29 UTC](https://discourse.nodered.org/t/parsing-data-on-a-html-website/1733/6 "2018-07-22T10:29:58Z")

</div>

Thank you! I will try!

---

<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:** [22 July 2018 10:37 UTC](https://discourse.nodered.org/t/parsing-data-on-a-html-website/1733/7 "2018-07-22T10:37:05Z")

</div>

> [@ukmoose](#):
>
> scrape javascript tendered page”

A typo there I think, should be _rendered_ possibly.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [22 July 2018 12:30 UTC](https://discourse.nodered.org/t/parsing-data-on-a-html-website/1733/8 "2018-07-22T12:30:49Z")

</div>

yep, rendered ooooops!
