Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

retrieve-real-html

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retrieve-real-html

Retrieves the HTML a browser would see after a full page load and scroll to bottom.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

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

Keywords

html

FAQs

Package last updated on 26 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts