node-red/packages/node_modules/@node-red/nodes/examples/parser/html/03 - Extract array of HTML ...

121 lines
2.9 KiB
JSON

[
{
"id": "653ce9aa.b6a1c8",
"type": "inject",
"z": "4b63452d.672afc",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 220,
"y": 560,
"wires": [
[
"52a16f7f.447d8"
]
]
},
{
"id": "52a16f7f.447d8",
"type": "template",
"z": "4b63452d.672afc",
"name": "HTML text",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "plain",
"template": "<html>\n <head>\n <title>List of Fruits</title>\n </head>\n <body>\n <ul>\n <li class=\"Item\">Apple</li>\n <li class=\"Item\">Orange</li>\n <li class=\"Item\">Banana</li>\n </ul>\n </body>\n</html>\n",
"output": "str",
"x": 390,
"y": 560,
"wires": [
[
"a52319c3.89b008"
]
]
},
{
"id": "8bc35379.31d99",
"type": "comment",
"z": "4b63452d.672afc",
"name": "Extract array of HTML element by CSS selector specified in message",
"info": "CSS selector for HTML node can be specified by `select` property of input message.",
"x": 350,
"y": 500,
"wires": []
},
{
"id": "9c49de8a.bad25",
"type": "html",
"z": "4b63452d.672afc",
"name": "",
"property": "payload",
"outproperty": "payload",
"tag": "",
"ret": "html",
"as": "single",
"x": 730,
"y": 560,
"wires": [
[
"d4f4b987.278a68"
]
]
},
{
"id": "d4f4b987.278a68",
"type": "debug",
"z": "4b63452d.672afc",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 890,
"y": 560,
"wires": []
},
{
"id": "a52319c3.89b008",
"type": "change",
"z": "4b63452d.672afc",
"name": "",
"rules": [
{
"t": "set",
"p": "select",
"pt": "msg",
"to": ".Item",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 560,
"y": 560,
"wires": [
[
"9c49de8a.bad25"
]
]
}
]