Http request help from web

Hi, I am very new to node-red, I am currently using it from homeassistant.

I want to extract the information from the web page of my solar panels as the current watts, in the first image I want to extract the information of the h2, in the second image I have started an http request to the page of the solar panels and then an html node to search h2, finally when I debug I get the line I want but not the numerical information.


Try span.generated-energy-value and set the html node to text from element.

Thanks for the answer but I still don't get the information back :frowning:

Post the payload from the http request node, so I can test.

okey let me change the pass

I'm sorry I wasn't understanding you, my fault.

msg : Object

object

_msgid: "5d51e6ef48c504ff"

payload: array[1]

0: ""

topic: ""

statusCode: 200

headers: object

date: "Sat, 11 Jun 2022 11:48:59 GMT"

server: "Apache/2.4.38 (Debian)"

x-frame-options: "SAMEORIGIN"

strict-transport-security: "max-age=63072000; includeSubDomains"

expires: "Thu, 19 Nov 1981 08:52:00 GMT"

cache-control: "no-cache="Set-Cookie, Set-Cookie2""

pragma: "no-cache"

vary: "Accept-Encoding"

x-xss-protection: "1; mode=block"

x-content-type-options: "nosniff"

set-cookie: array[1]

0: "ci_session=t6rc5o9ch8ss3lkvekbmc0vegla49c5p; expires=Sat, 11-Jun-2022 13:48:59 GMT; Max-Age=7200; path=/; secure; HttpOnly;HttpOnly;Secure"

connection: "close"

transfer-encoding: "chunked"

content-type: "text/html; charset=utf-8"

x-node-red-request-node: "2f10e8c8"

responseUrl: "The platform to help you save energy in your home"

redirectList: array[0]

retry: 0

responseCookies: object

ci_session: object

expires: "Sat, 11-Jun-2022 13:48:59 GMT"

Max-Age: "7200"

path: "/"

value: "t6rc5o9ch8ss3lkvekbmc0vegla49c5p"

I apologize, but how can I provide it to you?

{"_msgid":"2603b206eb4f30ef","payload":[""],"topic":"","statusCode":200,"headers":{"date":"Sat, 11 Jun 2022 12:02:33 GMT","server":"Apache/2.4.38 (Debian)","x-frame-options":"SAMEORIGIN","strict-transport-security":"max-age=63072000; includeSubDomains","expires":"Thu, 19 Nov 1981 08:52:00 GMT","cache-control":"no-cache="Set-Cookie, Set-Cookie2"","pragma":"no-cache","vary":"Accept-Encoding","x-xss-protection":"1; mode=block","x-content-type-options":"nosniff","set-cookie":["ci_session=17p1pe9323cc8o8v8umqstsucmj35k43; expires=Sat, 11-Jun-2022 14:02:33 GMT; Max-Age=7200; path=/; secure; HttpOnly;HttpOnly;Secure"],"connection":"close","transfer-encoding":"chunked","content-type":"text/html; charset=utf-8","x-node-red-request-node":"fce722b8"},"responseUrl":"https://wapp.solarprofit.es/mirubee_front/index.php/buildings/83323/solar","redirectList":[],"retry":0,"responseCookies":{"ci_session":{"expires":"Sat, 11-Jun-2022 14:02:33 GMT","Max-Age":"7200","path":"/","value":"17p1pe9323cc8o8v8umqstsucmj35k43"}}}

If it is the final debugging

I'm sorry I haven't been here long and I don't know much, now it won't let me post in this post.

<span class="red-ui-debug-msg-payload"><span class="red-ui-debug-msg-element red-ui-debug-msg-top-level collapsed"><span class="red-ui-debug-msg-row red-ui-debug-msg-expandable"><i class="fa fa-caret-right red-ui-debug-msg-object-handle"></i><span class="red-ui-debug-msg-tools"><span class="red-ui-debug-msg-tools-copy button-group"><button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button></span></span><span class="red-ui-debug-msg-object-value"><span class="red-ui-debug-msg-object-header"><span>{ </span><span class="red-ui-debug-msg-object-key">_msgid</span><span>: </span><span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-string">"e42a138da9c66bee"</span><span>, </span><span class="red-ui-debug-msg-object-key">payload</span><span>: </span><span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-string">"↵   →→&lt;!DOCTYPE HTML&gt;↵&lt;html&gt;↵ …"</span><span>, </span><span class="red-ui-debug-msg-object-key">topic</span><span>: </span><span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-string">""</span><span>, </span><span class="red-ui-debug-msg-object-key">statusCode</span><span>: </span><span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-number">200</span><span>, </span><span class="red-ui-debug-msg-object-key">headers</span><span>: </span><span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta">object</span><span> …</span><span> }</span></span></span></span></span></span>

ok
i can even give you guest access to the url of the http request

<span class="red-ui-debug-msg-payload"><span class="red-ui-debug-msg-element red-ui-debug-msg-top-level built"><span class="red-ui-debug-msg-row red-ui-debug-msg-expandable"><i class="fa fa-caret-right red-ui-debug-msg-object-handle"></i><span class="red-ui-debug-msg-tools"><span class="red-ui-debug-msg-tools-copy button-group"><button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button></span></span><span class="red-ui-debug-msg-object-value"><span class="red-ui-debug-msg-object-header"><span>{ </span><span class="red-ui-debug-msg-object-key">_msgid</span><span>: </span><span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-string">"a87b3661fc77b609"</span><span>, </span><span class="red-ui-debug-msg-object-key">payload</span><span>: </span><span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-string">"↵   →→&lt;!DOCTYPE HTML&gt;↵&lt;html&gt;↵ …"</span><span>, </span><span class="red-ui-debug-msg-object-key">topic</span><span>: </span><span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-string">""</span><span>, </span><span class="red-ui-debug-msg-object-key">statusCode</span><span>: </span><span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-number">200</span><span>, </span><span class="red-ui-debug-msg-object-key">headers</span><span>: </span><span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta">object</span><span> …</span><span> }</span></span></span><span class="red-ui-debug-msg-type-meta red-ui-debug-msg-object-type-header">object</span></span><div class="red-ui-debug-msg-object-entry collapsed"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-tools"><span class="red-ui-debug-msg-tools-copy button-group"><button class="red-ui-button red-ui-button-small"><i class="fa fa-terminal"></i></button><button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button></span><button class="red-ui-button red-ui-button-small red-ui-debug-msg-tools-pin"><i class="fa fa-map-pin"></i></button></span><span class="red-ui-debug-msg-object-key">_msgid</span><span>: </span><span class="red-ui-debug-msg-object-value"><span class="red-ui-debug-msg-type-string red-ui-debug-msg-object-header">"a87b3661fc77b609"</span></span></span></span></div><div class="red-ui-debug-msg-object-entry collapsed"><span class="red-ui-debug-msg-element collapsed"><span class="red-ui-debug-msg-row red-ui-debug-msg-expandable"><i class="fa fa-caret-right red-ui-debug-msg-object-handle"></i><span class="red-ui-debug-msg-tools"><span class="red-ui-debug-msg-tools-copy button-group"><button class="red-ui-button red-ui-button-small"><i class="fa fa-terminal"></i></button><button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button></span><button class="red-ui-button red-ui-button-small red-ui-debug-msg-tools-pin"><i class="fa fa-map-pin"></i></button></span><span class="red-ui-debug-msg-object-key">payload</span><span>: </span><span class="red-ui-debug-msg-object-value"><span class="red-ui-debug-msg-type-string red-ui-debug-msg-object-header">"↵   →→&lt;!DOCTYPE HTML&gt;↵&lt;html&gt;↵    &lt;head&gt;↵        &lt;!-- Head (título y css comunes --&gt;↵        ↵&lt;!-- Google Tag Manager --&gt;↵&lt;script&gt;(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':↵new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],↵j=d.createElement(s),dl=l!='dataLayer'?'&amp;l='+l:'';j.async=true;j.src=↵'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);↵})(window,document,'script','dataLayer','GTM-N6MDD3');&lt;/script&gt;↵&lt;!-- End Google Tag Manager --&gt;↵↵&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;↵&lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;↵↵&lt;title&gt;The platform to help you save energy in your home&lt;/title&gt;↵↵&lt;!-- Vendor styles --&gt;↵&lt;link rel="stylesheet" type="text/css" href="https://wapp.solarprofit.es/mirubee_front/css/vendors/font-awesome.css" /&gt;↵&lt;link rel="stylesheet" type="text/css" href="https://wapp.solarprofit.es/mirubee_front/css/vendors/pe-icon-7-stroke.css" /&gt;↵&lt;link rel="st..."</span></span></span></span></div><div class="red-ui-debug-msg-object-entry collapsed"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-tools"><span class="red-ui-debug-msg-tools-copy button-group"><button class="red-ui-button red-ui-button-small"><i class="fa fa-terminal"></i></button><button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button></span><button class="red-ui-button red-ui-button-small red-ui-debug-msg-tools-pin"><i class="fa fa-map-pin"></i></button></span><span class="red-ui-debug-msg-object-key">topic</span><span>: </span><span class="red-ui-debug-msg-object-value"><span class="red-ui-debug-msg-type-string red-ui-debug-msg-object-header">""</span></span></span></span></div><div class="red-ui-debug-msg-object-entry collapsed"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-tools"><span class="red-ui-debug-msg-tools-copy button-group"><button class="red-ui-button red-ui-button-small"><i class="fa fa-terminal"></i></button><button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button></span><button class="red-ui-button red-ui-button-small red-ui-debug-msg-tools-pin"><i class="fa fa-map-pin"></i></button></span><span class="red-ui-debug-msg-object-key">statusCode</span><span>: </span><span class="red-ui-debug-msg-object-value"><span class="red-ui-debug-msg-type-number red-ui-debug-msg-type-number-toggle">200</span></span></span></span></div><div class="red-ui-debug-msg-object-entry collapsed"><span class="red-ui-debug-msg-element collapsed"><span class="red-ui-debug-msg-row red-ui-debug-msg-expandable"><i class="fa fa-caret-right red-ui-debug-msg-object-handle"></i><span class="red-ui-debug-msg-tools"><span class="red-ui-debug-msg-tools-copy button-group"><button class="red-ui-button red-ui-button-small"><i class="fa fa-terminal"></i></button><button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button></span><button class="red-ui-button red-ui-button-small red-ui-debug-msg-tools-pin"><i class="fa fa-map-pin"></i></button></span><span class="red-ui-debug-msg-object-key">headers</span><span>: </span><span class="red-ui-debug-msg-object-value"><span class="red-ui-debug-msg-type-meta">object</span></span></span></span></div><div class="red-ui-debug-msg-object-entry collapsed"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-tools"><span class="red-ui-debug-msg-tools-copy button-group"><button class="red-ui-button red-ui-button-small"><i class="fa fa-terminal"></i></button><button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button></span><button class="red-ui-button red-ui-button-small red-ui-debug-msg-tools-pin"><i class="fa fa-map-pin"></i></button></span><span class="red-ui-debug-msg-object-key">responseUrl</span><span>: </span><span class="red-ui-debug-msg-object-value"><span class="red-ui-debug-msg-type-string red-ui-debug-msg-object-header">"https://wapp.solarprofit.es/mirubee_front/index.php/buildings/83323/solar"</span></span></span></span></div><div class="red-ui-debug-msg-object-entry collapsed"><span class="red-ui-debug-msg-element collapsed"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-tools"><span class="red-ui-debug-msg-tools-copy button-group"><button class="red-ui-button red-ui-button-small"><i class="fa fa-terminal"></i></button><button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button></span><button class="red-ui-button red-ui-button-small red-ui-debug-msg-tools-pin"><i class="fa fa-map-pin"></i></button></span><span class="red-ui-debug-msg-object-key">redirectList</span><span>: </span><span class="red-ui-debug-msg-object-value"><span class="red-ui-debug-msg-type-meta">array[0]</span></span></span></span></div><div class="red-ui-debug-msg-object-entry collapsed"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-tools"><span class="red-ui-debug-msg-tools-copy button-group"><button class="red-ui-button red-ui-button-small"><i class="fa fa-terminal"></i></button><button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button></span><button class="red-ui-button red-ui-button-small red-ui-debug-msg-tools-pin"><i class="fa fa-map-pin"></i></button></span><span class="red-ui-debug-msg-object-key">retry</span><span>: </span><span class="red-ui-debug-msg-object-value"><span class="red-ui-debug-msg-type-number red-ui-debug-msg-type-number-toggle">0</span></span></span></span></div><div class="red-ui-debug-msg-object-entry collapsed"><span class="red-ui-debug-msg-element collapsed"><span class="red-ui-debug-msg-row red-ui-debug-msg-expandable"><i class="fa fa-caret-right red-ui-debug-msg-object-handle"></i><span class="red-ui-debug-msg-tools"><span class="red-ui-debug-msg-tools-copy button-group"><button class="red-ui-button red-ui-button-small"><i class="fa fa-terminal"></i></button><button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button></span><button class="red-ui-button red-ui-button-small red-ui-debug-msg-tools-pin"><i class="fa fa-map-pin"></i></button></span><span class="red-ui-debug-msg-object-key">responseCookies</span><span>: </span><span class="red-ui-debug-msg-object-value"><span class="red-ui-debug-msg-type-meta">object</span></span></span></span></div></span></span>

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