Skip to content

dave9123/screenshotwebsite

Repository files navigation

ScreenshotWebsite

SQLite NodeJS JavaScript

A tool to screenshot websites automatically that has a queue system.

Setup

  1. Make sure you have Bun installed
  2. Install packages by running bun install
  3. Modify config.json to your liking

Configuration

  • screenshotDir

    Directory path to store screenshots, example: "screenshots"

  • userAgent

    The User-Agent the browser will use, example: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"

  • browserPath

    Path to installed browser, example: "C:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe"

  • retryLimit

    Limit how many times to retry on error before skipping, example: 1

  • viewportHeight

    Screenshot height, example: 1920

  • viewportWidth

    Screenshot width, example: 1080

  • headless

    Runs browser in headless mode, options: true and false, example: true

  • dumpio

    Outputs browser's stdout and stderr, options: true and false, example: false

  • browser

    Browser type that is used (make sure this matches with the browser set on browserPath), option: chrome, example: chrome

  • keepHistoryOnClear

    Clears console but keeps scrollback history intact, options: true and false, example: false

Running

Run bun index.js

Usage

  • add <URL> Adds a URL to the database
  • import <file> Imports a text file and adds URL(s) splitted by new line to the database
  • start Start or resume job(s)
  • pause Pauses job(s)
  • clear Clears screen on terminal
  • exit Close browser and database then exits

Todo

  1. Try catch handler for process sites function
  2. Bypass Cloudflare UAM
  3. Make UI
  4. Support command arguments
  5. Support other browsers

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •