A utility for fetching dynamically rendered HTML content from websites using Puppeteer.
You can run this tool directly 7414 without installation using npx:
npx @karpeleslab/klbfw-dynfetch <url>
Example:
npx @karpeleslab/klbfw-dynfetch https://example.com
This will output the fully rendered HTML after JavaScript execution.
npm install -g @karpeleslab/klbfw-dynfetch
Then you can use it as:
klbfw-dynfetch <url>
npm install @karpeleslab/klbfw-dynfetch
You can also use this package programmatically in your code:
const { fetchRenderedHtml } = require('@karpeleslab/klbfw-dynfetch');
fetchRenderedHtml('https://example.com')
.then(html => {
console.log(html);
})
.catch(error => {
console.error('Error:', error);
});
Clone the repository and install dependencies:
git clone https://github.com/karpeleslab/klbfw-dynfetch.git
cd klbfw-dynfetch
npm install
Run locally:
npm start <url>
or
node src/index.js <url>