usechainlinkfunctions
usechainlinkfunctions copied to clipboard
MTA fair price tollbooth HighWei - npm package support for puppeteer to XPATH scrape?
Questions:
- Can we use custom node.js libraries somehow?
I tried:
npm i puppeteer
but get error:
__Error thrown in sandboxed source code__
Cannot find module 'puppeteer'
__Simulated On-Chain Response__
Error message returned to client contract: "Cannot find module 'puppeteer'"
- Can
Functions.makeHttpRequest
return an object which can be XPATH scraped in a simple way?
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| usechainlinkfunctions | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 26, 2023 2:58am |
Hi @MarcusWentz, I'll try to answer your questions.
re: 1. Can we use custom node.js libraries somehow?
-At the moment, no, only vanilla Node.js features are supported. Check https://docs.chain.link/chainlink-functions/resources/service-limits for more info.
re: 2. Can Functions.makeHttpRequest return an object which can be XPATH scraped in a simple way?
-To my best knowledge, it is possible in theory, most likely as a responseType 'document' or 'text', but you will need to handle interpreting XPATH by yourself without using external NPM libraries since XPATH natively isn't a feature of Node.js