No problem. I'm not sure Espruino can totally do what you want (be an embedded web browser), but there may still be a way around it.
I'm guessing a bit here because I don't know what these devices are or what the webpages look like, but I suppose what happens is the device serves up a webpage with some JavaScript on it in a <script> tag, and that JavaScript requests the data from somewhere else.
Personally, I think the best way to get the data is to forget about executing that JavaScript code. I'd open the device's webpage on a desktop computer with Chrome, right-click, and click inspect element. You'll then get a debug screen where you can see what the webpage is doing.
You'll probably want to go into the 'Network' tab and look at what's actually going on, but I bet you'll find that it loads some other file, maybe something like mydata.json.
Instead of trying to load the original webpage, just load that file, and manually decode what's in it.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
No problem. I'm not sure Espruino can totally do what you want (be an embedded web browser), but there may still be a way around it.
I'm guessing a bit here because I don't know what these devices are or what the webpages look like, but I suppose what happens is the device serves up a webpage with some JavaScript on it in a
<script>
tag, and that JavaScript requests the data from somewhere else.Personally, I think the best way to get the data is to forget about executing that JavaScript code. I'd open the device's webpage on a desktop computer with Chrome, right-click, and click
inspect element
. You'll then get a debug screen where you can see what the webpage is doing.You'll probably want to go into the 'Network' tab and look at what's actually going on, but I bet you'll find that it loads some other file, maybe something like
mydata.json
.Instead of trying to load the original webpage, just load that file, and manually decode what's in it.