Hi,
Looking for help, i have basic flow that triggers 5hours from a website everyday at 00:00 and write them in a times.txt file. The flow works but on the times.txt file something changed and the hours is not extracted correctly.. Wondering if something changed on the webpage but here is the details..
[{"id":"affc24ff.283a6","type":"html","z":"514f2f91209bfa9f","name":"html select","property":"payload","outproperty":"payload","tag":"#tab-0 > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(3) ","ret":"html","as":"single","x":430,"y":260,"wires":[["db1153ea.fdbd48"]]},{"id":"db1153ea.fdbd48","type":"change","z":"514f2f91209bfa9f","name":"","rules":[{"t":"change","p":"payload[0]","pt":"msg","from":"<td>","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload[0]","pt":"msg","from":"</td>","fromt":"str","to":",","tot":"str"},{"t":"change","p":"payload[0]","pt":"msg","from":"<tr>","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload[0]","pt":"msg","from":"</tr>","fromt":"str","to":";","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"},{"t":"change","p":"payload","pt":"msg","from":"\\s\\n","fromt":"re","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":" ","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"\\n","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"\\n","fromt":"re","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":260,"wires":[["7c3efd76.8ed5a4"]]},{"id":"7c3efd76.8ed5a4","type":"function","z":"514f2f91209bfa9f","name":"ProcessData","func":"var a = msg.payload\nvar timeWithDate = a.split(';');\nvar timeWithDateFiltered = timeWithDate.filter(function (el) {return el;});\n\nvar out=[];\nfor(let i=0; i< timeWithDateFiltered.length;i++){\n let times = timeWithDateFiltered[i].split(\",\");\n let date = times[0];//date is first element in array\n times.splice(0,1);//remove date\n let timesFiltered = times.filter(function (el) {return el;});\n out.push({time:timesFiltered,date:date});\n}\nmsg.payload= out;\nreturn msg;","outputs":1,"noerr":0,"x":770,"y":260,"wires":[["208e89e58cd3a7d7"]]},{"id":"7b121cdb.e41614","type":"inject","z":"514f2f91209bfa9f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"14400","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":110,"y":260,"wires":[["7b3aa38e.0f69c4"]]},{"id":"7b3aa38e.0f69c4","type":"http request","z":"514f2f91209bfa9f","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://namazvakitleri.diyanet.gov.tr/en-US/9132/prayer-time-for-montreal","tls":"","proxy":"","authType":"","x":270,"y":260,"wires":[["affc24ff.283a6"]]},{"id":"74acfb0aafb8c5d8","type":"file","z":"514f2f91209bfa9f","name":"","filename":"/config/times.txt","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1100,"y":260,"wires":[[]]},{"id":"208e89e58cd3a7d7","type":"change","z":"514f2f91209bfa9f","name":"TodayToFile","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":930,"y":260,"wires":[["74acfb0aafb8c5d8"]]}]