ellegi

Untitled

Jul 19th, 2022
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.04 KB | None | 0 0
  1. [
  2. {
  3. "id": "a8e11efd.8368c8",
  4. "type": "http request",
  5. "z": "554430e1.4175c8",
  6. "name": "",
  7. "method": "POST",
  8. "ret": "txt",
  9. "paytoqs": false,
  10. "url": "",
  11. "tls": "64a07bdd.aad244",
  12. "persist": false,
  13. "proxy": "",
  14. "authType": "",
  15. "x": 610,
  16. "y": 80,
  17. "wires": [
  18. [
  19. "3e7d1f5a.7ff2b8"
  20. ]
  21. ]
  22. },
  23. {
  24. "id": "10325700.3752a9",
  25. "type": "inject",
  26. "z": "554430e1.4175c8",
  27. "name": "",
  28. "topic": "",
  29. "payload": "",
  30. "payloadType": "date",
  31. "repeat": "43200",
  32. "crontab": "",
  33. "once": false,
  34. "onceDelay": 0.1,
  35. "x": 110,
  36. "y": 80,
  37. "wires": [
  38. [
  39. "40bc74a3.e658fc"
  40. ]
  41. ]
  42. },
  43. {
  44. "id": "40bc74a3.e658fc",
  45. "type": "http request",
  46. "z": "554430e1.4175c8",
  47. "name": "",
  48. "method": "GET",
  49. "ret": "txt",
  50. "paytoqs": false,
  51. "url": "https://www.aslnapoli1centro.it/info-medici-pediatri",
  52. "tls": "64a07bdd.aad244",
  53. "persist": false,
  54. "proxy": "",
  55. "authType": "",
  56. "x": 290,
  57. "y": 80,
  58. "wires": [
  59. [
  60. "6585947c.d48f1c"
  61. ]
  62. ]
  63. },
  64. {
  65. "id": "6585947c.d48f1c",
  66. "type": "function",
  67. "z": "554430e1.4175c8",
  68. "name": "",
  69. "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;",
  70. "outputs": 1,
  71. "noerr": 0,
  72. "x": 450,
  73. "y": 80,
  74. "wires": [
  75. [
  76. "a8e11efd.8368c8"
  77. ]
  78. ]
  79. },
  80. {
  81. "id": "3e7d1f5a.7ff2b8",
  82. "type": "function",
  83. "z": "554430e1.4175c8",
  84. "name": "",
  85. "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;",
  86. "outputs": 1,
  87. "noerr": 0,
  88. "x": 770,
  89. "y": 80,
  90. "wires": [
  91. [
  92. "cb0cdd98.4aee3"
  93. ]
  94. ]
  95. },
  96. {
  97. "id": "cb0cdd98.4aee3",
  98. "type": "http request",
  99. "z": "554430e1.4175c8",
  100. "name": "",
  101. "method": "POST",
  102. "ret": "txt",
  103. "paytoqs": false,
  104. "url": "",
  105. "tls": "64a07bdd.aad244",
  106. "persist": false,
  107. "proxy": "",
  108. "authType": "",
  109. "x": 930,
  110. "y": 80,
  111. "wires": [
  112. [
  113. "8507e050.7b5b48"
  114. ]
  115. ]
  116. },
  117. {
  118. "id": "beb07012.8d7068",
  119. "type": "cheerio-function",
  120. "z": "554430e1.4175c8",
  121. "name": "",
  122. "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;",
  123. "outputs": 1,
  124. "noerr": 0,
  125. "x": 1220,
  126. "y": 80,
  127. "wires": [
  128. [
  129. "8e529bdc.e23418"
  130. ]
  131. ]
  132. },
  133. {
  134. "id": "8507e050.7b5b48",
  135. "type": "function",
  136. "z": "554430e1.4175c8",
  137. "name": "",
  138. "func": "\nmsg.payload = flow.get(\"pagina1\") + msg.payload; \n\nreturn msg;",
  139. "outputs": 1,
  140. "noerr": 0,
  141. "x": 1070,
  142. "y": 80,
  143. "wires": [
  144. [
  145. "beb07012.8d7068"
  146. ]
  147. ]
  148. },
  149. {
  150. "id": "4bd9f18d.17c3",
  151. "type": "comment",
  152. "z": "554430e1.4175c8",
  153. "name": "navigo la home dei medici per prendere il sessionid",
  154. "info": "",
  155. "x": 310,
  156. "y": 40,
  157. "wires": []
  158. },
  159. {
  160. "id": "9d0e96ea.276898",
  161. "type": "comment",
  162. "z": "554430e1.4175c8",
  163. "name": "faccio le due chiamate post di pagina 1 e 2",
  164. "info": "",
  165. "x": 880,
  166. "y": 40,
  167. "wires": []
  168. },
  169. {
  170. "id": "42835b12.c05124",
  171. "type": "comment",
  172. "z": "554430e1.4175c8",
  173. "name": "parso html",
  174. "info": "",
  175. "x": 1220,
  176. "y": 40,
  177. "wires": []
  178. },
  179. {
  180. "id": "b13ebbd2.576798",
  181. "type": "comment",
  182. "z": "554430e1.4175c8",
  183. "name": "leggo il vecchio file medici",
  184. "info": "",
  185. "x": 270,
  186. "y": 260,
  187. "wires": []
  188. },
  189. {
  190. "id": "8e529bdc.e23418",
  191. "type": "file in",
  192. "z": "554430e1.4175c8",
  193. "name": "",
  194. "filename": "medici.json",
  195. "format": "utf8",
  196. "chunk": false,
  197. "sendError": false,
  198. "encoding": "none",
  199. "x": 330,
  200. "y": 220,
  201. "wires": [
  202. [
  203. "2fb94859.70e16"
  204. ]
  205. ]
  206. },
  207. {
  208. "id": "2fb94859.70e16",
  209. "type": "json",
  210. "z": "554430e1.4175c8",
  211. "name": "",
  212. "property": "payload",
  213. "action": "",
  214. "pretty": false,
  215. "x": 510,
  216. "y": 220,
  217. "wires": [
  218. [
  219. "67d2336d.fdf36c",
  220. "467e0424.5d49bc"
  221. ]
  222. ]
  223. },
  224. {
  225. "id": "64a07bdd.aad244",
  226. "type": "tls-config",
  227. "z": "",
  228. "name": "",
  229. "cert": "",
  230. "key": "",
  231. "ca": "",
  232. "certname": "",
  233. "keyname": "",
  234. "caname": "",
  235. "servername": "",
  236. "verifyservercert": false
  237. }
  238. ]
Advertisement
Add Comment
Please, Sign In to add comment