# Scrape data from web page

**URL:** <https://discourse.nodered.org/t/scrape-data-from-web-page/93768>\
**Category:** General\
**Created:** [7 December 2024 20:09 UTC](https://discourse.nodered.org/t/scrape-data-from-web-page/93768 "2024-12-07T20:09:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marco-dmaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marco-dmaa/32/95560_2.png) [@marco-dmaa](https://discourse.nodered.org/u/marco-dmaa)\
**Post date:** [7 December 2024 20:09 UTC](https://discourse.nodered.org/t/scrape-data-from-web-page/93768/1 "2024-12-07T20:09:58Z")

</div>

Good evening! I've been trying to extract data from an HTML page for a week, but I just can't seem to do it...

I need to extract a value, and this is the xpath from Chrome console:

/html/body/section/md-content/div/div/div/div[2]/div[2]/div[2]/div/div/div[3]/label/text()

This is the page code:

 ![1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/a/fa0f10dd0cd8b1d33c60badd21688881dff95d60.png)  
 ![2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/2/a2694286634dd301f4f46f8a03db66f1902e5409.png)

The value i need is the "620" in the bottom...

How can i get it?

Now i'm using th HTTP REQUEST node and the HTML node..

Thank you all, Marco.

---

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [8 December 2024 09:27 UTC](https://discourse.nodered.org/t/scrape-data-from-web-page/93768/2 "2024-12-08T09:27:03Z")

</div>

Try using the [fastxml](https://flows.nodered.org/node/node-red-contrib-fastxml) node generate an object from the html content.

```auto
[{"id":"9f72ae77a6d5498c","type":"fastxml","z":"a46c1ba8882945f4","name":"","property":"payload","outproperty":"payload","attr":"","chr":"_","x":1058,"y":480,"wires":[["97b9a127797f71bb"]]},{"id":"2c161f4bfe5186d4","type":"http request","z":"a46c1ba8882945f4","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://google.com","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":863,"y":581,"wires":[["9f72ae77a6d5498c"]]},{"id":"97b9a127797f71bb","type":"debug","z":"a46c1ba8882945f4","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1237,"y":384,"wires":[]},{"id":"185b3110769c0fbf","type":"inject","z":"a46c1ba8882945f4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":645,"y":597,"wires":[["2c161f4bfe5186d4"]]}]

```

You get something like this:

 ![Screenshot 2024-12-08 at 10.19.08](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/5/b5ad4b50e37655aeddc0a4ef4db162dc77cd6f97.png)

---

<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:** [8 March 2025 09:27 UTC](https://discourse.nodered.org/t/scrape-data-from-web-page/93768/3 "2025-03-08T09:27:14Z")

</div>

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