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

scraper-copier

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scraper-copier

replicating server file structure on my computer

latest
Source
npmnpm
Version
1.0.17
Version published
Maintainers
1
Created
Source

Welcome

Scraper copier is a Command Line Interface (CLI) that replicate remote domain to local folder structure. Given a root URL, it find and scrap website to retrieve all valuable public files.

Instalation

The Installation of scraper copier can be completed by following the following steps.

NOTE: We assume that you have both node and npm installed.

  • Clone repository from github and cd into the repository
git clone https://github.com/Behemoth11/scraper-copier.git && 
cd scraper-copier
  • Install dependencies
npm install

At that point, you should be able to run the node script located in the dist flolder.

node ./dist/index.js

Link to video tutorial

Passing argument to process

Argument can be passed to the node process as you would for any other CLI.

node ./dist/index.js --help 

Adding scraper to path

You may want to add the markdown file to your path variable. Luckily, this can be quite easily achived.

  • Change file permission.
chmod +x ./dist/index.js
  • Link the project
npm link

The program can now be accessed under the name scraper.

scraper --help

* Change path binary name

Open the package.json in the root of the the project and change the key associated to binary to the diserd name.

{
  "bin": {
    "NAME_OF_BINARY": "./dist/index.js"
  },
  /*...*/  
}

replace NAME_OF_BINARY by desired bin name. Then, link the project again.

Basic Usage

Use the following command to copy the url located on domain to local folder in dest. Files will be saved under their respective domain name.

node ./dist/index.js load <url> [dest]

eg:

node ./dist/index.js load https://komlankodoh.com .

The command above load pages from komlankodoh.com to the active folder designed by .

FAQs

Package last updated on 02 Apr 2022

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