# Web scraping issue

**URL:** https://discourse.nodered.org/t/web-scraping-issue/37945
**Category:** General
**Created:** [23 December 2020 21:20 UTC](https://discourse.nodered.org/t/web-scraping-issue/37945 "2020-12-23T21:20:14Z")
**Posts on this page:** 1
**Showing post:** 20

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [12 January 2021 10:50 UTC](https://discourse.nodered.org/t/web-scraping-issue/37945/20 "2021-01-12T10:50:44Z")

</div>

This sub flow is how I've been grabbing the latest release of Tasmota in my ['ET Display Home' a flow to help manage your ESPeasy, Sonoff/Tasmota and Homie flashed devices (now on GitHub)](https://discourse.nodered.org/t/et-display-home-a-flow-to-help-manage-your-espeasy-sonoff-tasmota-and-homie-flashed-devices-now-on-github/1893) flow since I first published the flow back in 2018

```auto
[{"id":"fc3e43d5.47c3e","type":"http request","z":"fa6ef639.63d4e8","name":"Get SonOff releases","method":"GET","ret":"txt","paytoqs":false,"url":"","tls":"","proxy":"","authType":"","x":600,"y":220,"wires":[["3a4c8bfe.cdc6ac"]]},{"id":"a404b866.174848","type":"change","z":"fa6ef639.63d4e8","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"https://github.com/arendst/Sonoff-Tasmota/releases","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":180,"wires":[["fc3e43d5.47c3e"]]},{"id":"3aa39bda.588e14","type":"inject","z":"fa6ef639.63d4e8","name":"Check for new Tasmota release","topic":"","payload":"1","payloadType":"str","repeat":"21600","crontab":"","once":true,"onceDelay":0.1,"x":640,"y":100,"wires":[["a404b866.174848"]]},{"id":"3a4c8bfe.cdc6ac","type":"function","z":"fa6ef639.63d4e8","name":"extract latest version","func":"var n = msg.payload.indexOf('<a href=\"/arendst/Tasmota/tree/');\n//node.warn(\"n=\" + n);\nvar str = '<a href=\"/arendst/Tasmota/tree/';\nvar l = str.length;\nn += l;\n//node.warn(\"nl=\" + n);\n//str = msg.payload.substring(n, 13);\n//node.warn(\"str=\" + str);\nmsg.payload = msg.payload.substring(n+1, n+6);\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":260,"wires":[["5b7daebe.09d8f8"]]},{"id":"954daab5.89b158","type":"sqlite","z":"fa6ef639.63d4e8","mydb":"47186c71.905e34","sqlquery":"fixed","sql":"delete from firmware where platform = \"tasmota\";","name":"delete tasmota row","x":590,"y":140,"wires":[["a404b866.174848"]]},{"id":"5b7daebe.09d8f8","type":"change","z":"fa6ef639.63d4e8","name":"store global","rules":[{"t":"set","p":"ETDH.tasmota","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":260,"wires":[[]]},{"id":"47186c71.905e34","type":"sqlitedb","z":"","db":"/home/pi/esp8266.db"}]

```

---

_[View the full topic](https://discourse.nodered.org/t/web-scraping-issue/37945)._
