Taking a screenshot of a website with an external service
The previous recipe used selenium, webdriver, and PhantomJS to create the screenshot. This obviously requires having those packages installed. If you don't want to install those and still want to make website screenshots, then you can use one of a number of web services that can take screenshots. In this recipe, we will use the service at www.screenshotapi.io to create a screenshot.
Getting ready
First, head over to www.screenshotapi.io
and sign up for a free account:

Screenshot of the free account sign up
Once your account is created, proceed to get an API key. This will be needed to authenticate against their service:

The API Key
How to do it
The script for this example is 04/09_screenshotapi.py
. Give this a run and it will make a screenshot. The code is the following, and is very similar to the previous recipe in structure:
from core.website_screenshot_with_screenshotapi import WebsiteScreenshotGenerator from core.file_blob_writer...