Code Monkey home page Code Monkey logo

screenshot-site's Introduction

screenshot-site [FREE EDITION]

Скриншотер сайтов. Теперь уже точно [FREE EDITION]

  • Минус: Через некоторое время, банит ваш IP. Рекомендую использовать с прокси.

Установка:

npm install screenshot-site

Использование:

let shot = require("screenshot-site") 

shot({
    url: "github.com"
}, function(buffer){
    return console.log(buffer)
})

Пример параметров:

shot({
    url: "github.com", // isNeed? true
    resolution: "1920x1080", // isNeed? false; default: 1024x768
    scale: 1000, // isNeed? false; default: 1000,
    format: 1, // isNeed? false; default: 0; 0 for JPEG, 1 for PNG
    api: 1, // isNeed? false; default: 0; 0 for "mini", 1 for "api".
    proxy: "http://127.0.0.1:8080" // isNeed? false
}, function(buffer){ 
    return console.log(buffer) 
}) // isNeed? true; response: image buffer

Параметры:

Параметр Тип Нужен Описание
url string true Ссылка
resolution string/number false Разрешение скрина
scale number false Ширина скрина
format number false Формат скрина (0 для jpg, 1 для png)
api number false Какой API использовать? (0 для mini, 1 для api)
proxy string false Прокси

Прокси

Поддерживаются:

  1. http (http://)
  2. https (https://)
  3. socks (socks://)
  4. socks4 (socks4://) или socks5 (socks5://)
  5. pac (pac+http://)

После параметров, необходимо вставить callback.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.