1.0.5 • Published 8 months ago

@karpeleslab/klbfw-dynfetch v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

@karpeleslab/klbfw-dynfetch

A utility for fetching dynamically rendered HTML content from websites using Puppeteer.

Usage with npx

You can run this tool directly 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.

Installation

Global Installation

npm install -g @karpeleslab/klbfw-dynfetch

Then you can use it as:

klbfw-dynfetch <url>

Local Installation

npm install @karpeleslab/klbfw-dynfetch

Programmatic Usage

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);
  });

Development

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>
1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago