Docker image that exposes an API to convert html to images - DEPRECATED, use ata_phantomjs
2.1K
Webkit2png is a generic tool for getting a screenshot for a given url. The exposed API is written in Flask.
Just run docker-compose up and it will build the image and start up the container.
Exposed port is 8080 so API will be available at http://localhost:8080/
All the API implementation is located in the api/main.py.
import requests
url = 'http://localhost:8080/'
data = {
'url': 'source_url', # URL to the html to be converted
'dimensions': '800x600', # Dimensions of the screenshot, format: 'widthxheight', default is 1280x1024
'wait': '5' # Wait before taking screenshot, format: Number in seconds, default is 5 seconds
}
resp = requests.post(url=url, json=data)
import requests
url = 'http://localhost:8080/ping'
resp = requests.post(url=url, json={})
resp.json['status'] == 'ok'
Content type
Image
Digest
Size
309.5 MB
Last updated
over 9 years ago
docker pull advancedthreatanalytics/webkit2png