or
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/
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 |
Web
https://weblense.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) {
...
});
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.