How to download a webcam picture from URL and save it to folder

Hello,
i want to download the webcam picture from https://regiowebcam.de/fileadmin/user_upload/01_storch_kirchzarten2021.jpg?ver=1639302266349 and save it to a folder.
i want this to do later with Davinci Resolve a small timewarp Video about the week of the "Störche"

Which nodes are the things for me?

thx

Hello ..

Here is an example of a flow that uses the http-request node to pull the image (data buffer) and later save it with the use of File write node.

I tried to used a Function node in between to generate a unique name for the image filename.
(it may need a little tweeking. I used the date as a filename - you may need to change that)

Example Flow:

[{"id":"92cc7228ab7e22ce","type":"inject","z":"54efb553244c241f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":290,"y":1020,"wires":[["6fdf067fdc5f4ca6"]]},{"id":"6fdf067fdc5f4ca6","type":"http request","z":"54efb553244c241f","name":"","method":"GET","ret":"bin","paytoqs":"ignore","url":"https://regiowebcam.de/fileadmin/user_upload/01_storch_kirchzarten2021.jpg?ver=1639302266349","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"credentials":{},"x":480,"y":1020,"wires":[["337ff149a1b382ad"]]},{"id":"3174f03bedd6f49b","type":"file","z":"54efb553244c241f","name":"","filename":"","appendNewline":false,"createDir":false,"overwriteFile":"true","encoding":"none","x":880,"y":1020,"wires":[[]]},{"id":"91a3b46f1bebdf71","type":"debug","z":"54efb553244c241f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":830,"y":920,"wires":[]},{"id":"337ff149a1b382ad","type":"function","z":"54efb553244c241f","name":"","func":"let now = new Date().toISOString().replace(/:/g, \"-\")\n//node.warn(now);\n\nmsg.filename = `c:\\\\users\\\\user\\\\desktop\\\\${now}.jpg`\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":1020,"wires":[["3174f03bedd6f49b","91a3b46f1bebdf71"]]}]
2 Likes

That's do the trick - thanks a lot, for the quick help

let now = new Date().toISOString().replace

doesn't work. that's not a big deal, becausei got my own time-routine

For me works:

var dt = new Date(Date());

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