提问人:Shahram Shinshaawh 提问时间:5/30/2023 最后编辑:Shahram Shinshaawh 更新时间:5/30/2023 访问量:282
Node-red:解析 HTML 获取数据
Node-red: parse HTML to get data
问:
我正在尝试从这个站点获取一些信息,我在 node-red 中创建了一个非常简单的流程,但在输出中我无法找到值。
div.col-xs-12.col-sm-8 > div:nth-child(2) > div:nth-child(1) > table > tbody > tr:nth-child(2)")
和
div.col-xs-12.col-sm-8 > div:nth-child(2) > div:nth-child(1) > table > tbody > tr:nth-child(3)")
这是我在 Node-Red 中的流程:
[{"id":"653dfce2813a1724","type":"tab","label":"bonbast.com","disabled":false,"info":"","env":[]},{"id":"d88dd470.0ac7b8","type":"inject","z":"653dfce2813a1724","name":"make request","repeat":"","crontab":"","once":false,"topic":"","payload":"","payloadType":"date","x":150,"y":240,"wires":[["874a3d4e.9b666"]]},{"id":"874a3d4e.9b666","type":"http request","z":"653dfce2813a1724","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://www.bonbast.com/","tls":"","persist":true,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":314.5,"y":240,"wires":[["0e99fe6a44cb90ad"]]},{"id":"7403c68f.21d7c8","type":"debug","z":"653dfce2813a1724","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":990,"y":180,"wires":[]},{"id":"0e99fe6a44cb90ad","type":"html","z":"653dfce2813a1724","name":"","property":"payload","outproperty":"payload","tag":"table.table.table-condensed>tbody>tr>td","ret":"html","as":"single","x":640,"y":180,"wires":[["7403c68f.21d7c8"]]}]
但我在流的输出中收到的内容如下所示,并且值为空:
诚挚的问候,沙赫拉姆
答: 暂无答案
评论