WebLense

by clarkhacks

GitHub Readme.md

WebLense

How To:

✨ Remix on Glitch 🍬

or

Deploy

Or

git clone https://github.com/clarkhacks/WebLense.git
cd WebLense
npm install && npm start

PhantomJS, which is used for generating the screenshots, is installed automagically, but in some rare cases it might fail to and you'll get an Error: spawn EACCES error. Download PhantomJS manually if this occurs.

Then navigate to your Glitch Project Url or http://localhost:3000/

API

Use Lense endpoint for API calls.

GET Required Function url Yes URL To Capture width No End Width height No End Height delay No Delay Screenshot json No Return Json

Examples

Web

https://projectid.glitch.me/lense?url=https://clarkhacks.com/blog&width=1920&height=720

jQuery

$.get('https://projectid.glitch.me/lense', { url: 'https://clarkhacks.com' }, function(data) {
    ...
});

Out Of Space?

Glitch Projects are aloud 128mb of space. The WebLense app takes up ~40mb with captured images taking up the rest.

Options

  • Clear sites Folder
  • Host WebLense somewhere else.

💸 Buy Me A Beer 🍺