Web app written in Flask/Flask-restful to generate a screengrab from a given URL.
Web app and a simple API
-
YMMV, this is a personal project. Whilst it is working for me, due to the OS specific nature of PhantomJS, something might break for you.
-
Not all pages may render the way you will see in a Chhrom(ium)e, Firefox, Etc, this can be due to setTimeout or a plethora of other JS libs running on the site that renders the site in a time specific manner.
I was stuck without internet for a day, I wanted to make something using whatever leftover existing libraries I had contained within some other projects. I also wanted to create a RESTful API for the purpose of grabbing screengrabs of sites that have some form of paywall.
See requirements.txt or simply
pip install -r requirements.txt
End Point | /api/grab |
---|---|
Keys | url (required), width (optional), height (optional) |
Headers | api_key (required) |
Return Value | {'url':'filename.png'} |
Licensed under the GPLv2 Licence - See a copy of the licence here