New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

minispider

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minispider

Generate equivalent static site from living website

latest
npmnpm
Version
1.0.0-pre
Version published
Maintainers
1
Created
Source

minispider

Software that will scrape any static-like website and produce an equivalent static site.

Features:

  • The website can contain interactive JavaScript, SVG... Pages are loaded in Chrome to discover resources needed by the website as well as future pages to scan.
  • Experimental support for websites that use service workers or app cache.
  • The website can load dynamic resources as long as they're hosted outside (i.e. social widgets).
  • Works with decent-sized sites. Request and response headers of all the resources are all kept into RAM, but bodies are always saved progressively to the disk.
  • Supports exclusions (don't save a part of the website, either because it's dynamic or we don't care).
  • Saved website doesn't need to be a domain, it can be a subfolder. Or you can select resources by format. Or by prefix.
  • Can also save multiple domains, including wildcards such as saving anything at https://*.alba.sh/*.
  • As an intermediary step, this also produces a full-blown scan of the website, including resource headers, types, error page, which page references which resources, what the final rendered HTML is, etc. It can also report places where resources are loaded by absolute URL instead of relative URL, resources that are loaded through redirect, etc.

Limitations:

  • The website itself must be static or static-like. That is, requests must always return the same body, and must not return errors other than 404. Response can not vary depending on the query string, or on the headers.
  • Since this works like a web spider (scanning pages and resources recursively, starting from one or more roots) it may not discover all of them. You have to solve this manually by providing more roots or improving the scanning process yourself.

Install

This uses headless Chrome to do the scraping. By default, the version of Chrome bundled with puppeteer is used, so all you have to do is:

npm install

If you'd like to use a different Chrome executable than the bundled one, it can be changed through the configuration.

Usage

TODO

FAQs

Package last updated on 14 Dec 2018

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