ESP8266 - Request an URL with javascript

Posted on
  • Hello guys,

    i've a problem with my ESP8266 D1 mini:

    I'm a total newbie to this device and javascript as a language and i try to parse a website, wich only response all contents if javasript is activated in browser.

    If i request the page with the ESP via "Get"-method there is not the full source code as response. How can i act like the browser, where js is activated, with my ESPruino 8266?

    Any Ideas?



  • Tue 2020.04.21

    'with my ESPruino 8266?'

    Hi @user111636, not sure if this was an intentional mixup, or having fun with a play on words, but the 'ESP' prefix within 'ESPruino 8266' makes reference to the Tensilica processor chips manufactured by Espressif, while Espruino uses the STM32 and nRF52 processors, manufactured by STMicroelectronics and Nordic Semiconductor respectively. If not an insult, 'tis surely a violation of Tradename usage.­icroprocessors/stm32f401.html­rdware/esp8266ex/overview

  • Hey, it was just a Joke. I forget to tell you that there is an espruino flash on my ESP.



  • Can you share which page you try to access? And what do you try to achieve?

    In general you won't be able to act exactly like a browser, there is not enough flash and memory to emulate a full browser in a tiny uC. I think first you should try to get it working in some "normal" web development tool like postman / node JS script / curl / fiddler on your computer. And when it's working port it to Espruino & ESP8266.

  • I try to request a "https"-page and to read out the same code as is displayed within the development-tools in the browser.

    Edit: It's a fact that my problem is that javascript doesn't work with my ESP like it's working in the browser. Because if i deactivate javascript in the browser, the page shows the same values as is displayed by the request with the ESP.

    Many thanks for your suggestions @AkosLukacs, i'll try it first with node.js.



  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

ESP8266 - Request an URL with javascript

Posted by Avatar for user111636 @user111636