Skip to main content

Hello

I've creating a function to act as a rudimentary web scraper to grab some meta data like the page title, description etc using the `fetch()` api. 

In an automation, this works perfectly as expected. But in a scripting extension, my `try...catch` throws an error message of "Failed to fetch".

Are there some restrictions/limitations between automation scripts and extension scripts when it comes to using `fetch()` ?

In the extension, try replacing "fetch()" with "remoteFetchAsync()". This method only works in extension scripts whereas "fetch" works in automation scripts.

 


In the extension, try replacing "fetch()" with "remoteFetchAsync()". This method only works in extension scripts whereas "fetch" works in automation scripts.

 


Thanks that's fixed it! So simple 🤦


Reply