Collect https address

Hello , i use node python to launch a progamm wich create a unique HTTP each time i launch it. i would like to collect only The last link or better launch it directly. thanks a lot How can i do ?

Why don't you just generate the URL in node-red and miss out the python part altogether?

Secondly, if you must call python, are you able to modify it to send the data in JSON format?

Lastly, if you have no other options, use regex to extract the URL from that string.

Ps, it's not 100% clear what is generating that string as you haven't attached a debug node to the python node - so some of what I've said is speculation.

This created link download data from web and i Have to create a new one watch time
I will try what you say after my day work
I think json can be a good thing but i dont know how to use very well for the moment

i can take only the link in msg.payload but how can i execute it to receive data from this link

Use a http request node.

The cookbook has lots of examples. Work through them and you get your data in no time

I have closed your second thread. Please don't start new topics on the same subject.

sorry for double post i thought that was a little bit different
i tried with http response but in debug i have " no reponse object"
without http response python node send me the link in debug" it's the secure link i m waiting for"
This link must be open to see all the values from my weather stations here's a little exemple of what i want.
So do you think it's possible ? i look http cookbook but i' m a basic users and i don't really understant how to do that. Can you help me ?
thanks a lot


Change the debug node - set to show complete message.

Expand all properties. What do you see?

Hello, here's what i see


and heres the value if open the link in a browser


That doesn't look anything like the output of a http request node. Nor doe it look like you have set show full message.

Show a screenshot shot of your flow and the debug output from into and out of the http request.

@Steve-Mcl I think you've misinterpreted what you're being shown.

This is the message being received that contains the url to get. The question is how to do that.

@mykerinos1 You say you've tried with the HTTP Response node - that is not the right node to use. You should use the HTTP Request node. That node will make an http request to the url provided in msg.url. So you will need to add a Change node to move msg.payload to msg.url.

iin fact i tried with http response so i changed it with http request here's my flow i don't know how send my url to the http request as @knolleary said
i put a change function node but i don't know how to set

At the moment, the url you have is in msg.payload. You need it to be in msg.url before you pass it to the HTTP Request node.

Add a Change node before the HTTP Request node. Configure it to move msg.payload to msg.url.

i do that but http request said there's no url link

Change the set option to move

1 Like

It works !!!! :grin:

Thanks a lot .thanks also to @Steve-Mcl for your help

Another one stumped by the change node.

A few threads I've seen lately lead me to think Copy might be more appropriate than Set (translates better (see the German issue where it reads as Until),. I feel Copy is a bit clearer and as a bonus, the 2 fields would remain in the same place when you switch between Move and Copy mode)

(Not the place to discuss this I know - but contextually related)

1 Like

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