Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "a8e11efd.8368c8",
- "type": "http request",
- "z": "554430e1.4175c8",
- "name": "",
- "method": "POST",
- "ret": "txt",
- "paytoqs": false,
- "url": "",
- "tls": "64a07bdd.aad244",
- "persist": false,
- "proxy": "",
- "authType": "",
- "x": 610,
- "y": 80,
- "wires": [
- [
- "3e7d1f5a.7ff2b8"
- ]
- ]
- },
- {
- "id": "10325700.3752a9",
- "type": "inject",
- "z": "554430e1.4175c8",
- "name": "",
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "repeat": "43200",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "x": 110,
- "y": 80,
- "wires": [
- [
- "40bc74a3.e658fc"
- ]
- ]
- },
- {
- "id": "40bc74a3.e658fc",
- "type": "http request",
- "z": "554430e1.4175c8",
- "name": "",
- "method": "GET",
- "ret": "txt",
- "paytoqs": false,
- "url": "https://www.aslnapoli1centro.it/info-medici-pediatri",
- "tls": "64a07bdd.aad244",
- "persist": false,
- "proxy": "",
- "authType": "",
- "x": 290,
- "y": 80,
- "wires": [
- [
- "6585947c.d48f1c"
- ]
- ]
- },
- {
- "id": "6585947c.d48f1c",
- "type": "function",
- "z": "554430e1.4175c8",
- "name": "",
- "func": "\nvar cookie = msg.headers['set-cookie'][0];\n\nvar jsessionid = cookie.substring(0,cookie.indexOf(\";\"));\n\nvar html = msg.payload;\nvar startidx = html.indexOf(\"history-frame:\");\nvar endidx = html.indexOf(\":1\",startidx);\n\nvar icesession = html.substring(startidx+14,endidx);\n\n\nmsg.headers = {};\nmsg.headers={ \n 'Cookie': jsessionid + \";\",\n 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'\n};\n\n\nmsg.payload=\"ice.submit.partial=false&ice.event.target=_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3Abutton1&ice.event.captured=_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3Abutton1&ice.event.type=onclick&ice.event.alt=false&ice.event.ctrl=false&ice.event.shift=false&ice.event.meta=false&ice.event.x=881&ice.event.y=848&ice.event.left=false&ice.event.right=false&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6=&icefacesCssUpdates=&javax.faces.ViewState=1&javax.faces.RenderKitId=&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AtxtCognome=&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AtxtNome=&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3Aj_id17=G&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3Aj_id22=SI&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AelencoDistretti=26&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AtxtIndirizzo=&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AdataScroll_1=&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3A_idcl=&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3Abutton1=Cerca%20Medico&ice.session=\"+icesession+\"&ice.view=1&ice.focus=_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3Abutton1&rand=0.6312489612782481\";\nflow.set(\"jsessionid\", jsessionid);\nflow.set(\"icesession\", icesession);\nmsg.url = \"https://www.aslnapoli1centro.it/PortletElencoMedici/block/send-receive-updates\";\n//msg.url = \"https://www.giuseppeliguori.it/testheader.php\";\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 450,
- "y": 80,
- "wires": [
- [
- "a8e11efd.8368c8"
- ]
- ]
- },
- {
- "id": "3e7d1f5a.7ff2b8",
- "type": "function",
- "z": "554430e1.4175c8",
- "name": "",
- "func": "flow.set(\"pagina1\", msg.payload);\njsessionid = flow.get(\"jsessionid\");\nicesession = flow.get(\"icesession\");\n\nmsg.headers = {};\nmsg.headers={ \n 'Cookie': jsessionid + \";\",\n 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'\n};\n\nmsg.payload=\"ice.submit.partial=false&ice.event.target=_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AdataScroll_1idx2&ice.event.captured=_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AdataScroll_1idx2&ice.event.type=onclick&ice.event.alt=false&ice.event.ctrl=false&ice.event.shift=false&ice.event.meta=false&ice.event.x=824&ice.event.y=1303&ice.event.left=false&ice.event.right=false&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6=&icefacesCssUpdates=&javax.faces.ViewState=1&javax.faces.RenderKitId=&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AtxtCognome=&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AtxtNome=&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3Aj_id17=G&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3Aj_id22=SI&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AelencoDistretti=26&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AtxtIndirizzo=&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AdataScroll_1=idx2&_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3A_idcl=&ice.session=\"+icesession+\"&ice.view=1&ice.focus=_ElencoMediciExtended_WAR_PortletElencoMedici_%3Aj_id6%3AdataScroll_1idx2&rand=0.41913902471943876\";\nmsg.url = \"https://www.aslnapoli1centro.it/PortletElencoMedici/block/send-receive-updates\";\n\n//node.warn(msg);\n\n\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 770,
- "y": 80,
- "wires": [
- [
- "cb0cdd98.4aee3"
- ]
- ]
- },
- {
- "id": "cb0cdd98.4aee3",
- "type": "http request",
- "z": "554430e1.4175c8",
- "name": "",
- "method": "POST",
- "ret": "txt",
- "paytoqs": false,
- "url": "",
- "tls": "64a07bdd.aad244",
- "persist": false,
- "proxy": "",
- "authType": "",
- "x": 930,
- "y": 80,
- "wires": [
- [
- "8507e050.7b5b48"
- ]
- ]
- },
- {
- "id": "beb07012.8d7068",
- "type": "cheerio-function",
- "z": "554430e1.4175c8",
- "name": "",
- "func": "\nvar myArray = [];\n\n\nret = $(\"span[id*='valCognome']\").each(function( index ) {\nmyArray.push($( this ).text());\n// node.warn( index + \": \" + $( this ).text() );\n});\n\nmsg.payload = myArray;\nflow.set(\"mediciarray\", myArray);\n\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 1220,
- "y": 80,
- "wires": [
- [
- "8e529bdc.e23418"
- ]
- ]
- },
- {
- "id": "8507e050.7b5b48",
- "type": "function",
- "z": "554430e1.4175c8",
- "name": "",
- "func": "\nmsg.payload = flow.get(\"pagina1\") + msg.payload; \n\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 1070,
- "y": 80,
- "wires": [
- [
- "beb07012.8d7068"
- ]
- ]
- },
- {
- "id": "4bd9f18d.17c3",
- "type": "comment",
- "z": "554430e1.4175c8",
- "name": "navigo la home dei medici per prendere il sessionid",
- "info": "",
- "x": 310,
- "y": 40,
- "wires": []
- },
- {
- "id": "9d0e96ea.276898",
- "type": "comment",
- "z": "554430e1.4175c8",
- "name": "faccio le due chiamate post di pagina 1 e 2",
- "info": "",
- "x": 880,
- "y": 40,
- "wires": []
- },
- {
- "id": "42835b12.c05124",
- "type": "comment",
- "z": "554430e1.4175c8",
- "name": "parso html",
- "info": "",
- "x": 1220,
- "y": 40,
- "wires": []
- },
- {
- "id": "b13ebbd2.576798",
- "type": "comment",
- "z": "554430e1.4175c8",
- "name": "leggo il vecchio file medici",
- "info": "",
- "x": 270,
- "y": 260,
- "wires": []
- },
- {
- "id": "8e529bdc.e23418",
- "type": "file in",
- "z": "554430e1.4175c8",
- "name": "",
- "filename": "medici.json",
- "format": "utf8",
- "chunk": false,
- "sendError": false,
- "encoding": "none",
- "x": 330,
- "y": 220,
- "wires": [
- [
- "2fb94859.70e16"
- ]
- ]
- },
- {
- "id": "2fb94859.70e16",
- "type": "json",
- "z": "554430e1.4175c8",
- "name": "",
- "property": "payload",
- "action": "",
- "pretty": false,
- "x": 510,
- "y": 220,
- "wires": [
- [
- "67d2336d.fdf36c",
- "467e0424.5d49bc"
- ]
- ]
- },
- {
- "id": "64a07bdd.aad244",
- "type": "tls-config",
- "z": "",
- "name": "",
- "cert": "",
- "key": "",
- "ca": "",
- "certname": "",
- "keyname": "",
- "caname": "",
- "servername": "",
- "verifyservercert": false
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment