retrieve-real-html
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

retrieve-real-html

A function that retrieves the fully rendered HTML for a given a webpage and outputs it to a file. The function also returns the html string itself for method chaining if needed.

TypeScript Usage:

import { retrieveRealHTML } from 'retrieve-real-html';
import path from 'path';
 
// retrieves HTML from CNN homepage to folder in project root folder under output-images/
async function test() {
  const retrieveRealHTML = await retrieveRealHTML(
    "https://edition.cnn.com",
    path.join(__dirname, "..", "output-html")
  );
  console.log(
    "Done with HTML retrieval. Retrieved HTML: " +
      JSON.stringify(retrieveRealHTML)
  );
}
 
test();

Package Sidebar

Install

npm i retrieve-real-html

Weekly Downloads

4

Version

1.0.2

License

ISC

Unpacked Size

7.13 kB

Total Files

9

Last publish

Collaborators

  • princefishthrower