Scan

The Scanerr CLI has 3 commands to work with the Scan object:

  1. scan-site -> create scans of all pages of a specific site
  2. scan-page -> create a scan of a specific page
  3. get-scans -> get one or more scans

TIP

For information about the Scan object, please see Scan Overview.

Scan a Site

scan-site

This command will create a new Scan object for each Page object associated with the passed <site-id>.

The full command to Scan a Site is the following:

scanerr scan-site <site-id>
View Full Output

Output:

✔ Success
{
    'success': True,
    'message': 'Scans are being created in the background',
    'ids': ['9272cdcd-aa9e-4f22-995d-b66d73f0510d', 'dd173caa-7531-4b95-a6be-da1ce4abb7ee', 'e7df2805-097c-414e-b2c7-be7403a92925']
}

Scan a Page

scan-page

This command will create a new Scan object for the Page object associated with the passed <page-id>.

The full command to Scan a Page is the following:

scanerr scan-page <page-id>
View Full Output

Output:

✔ Success
{
    'success': True, 
    'message': 'Scans are being created in the background', 
    'ids': ['5487f495-5f8f-4b13-9287-0192b229ab40']
}

Retrieve Scans

get-scans

This command will retrieve one or more Scan objects associated with the passed --page-id=<page-id> or --scan-id=<scan-id>.

The full command to retrieve a Scan is the following:

scanerr get-scans --scan-id=<scan-id>
View Full Output
✔ Success
{
    'id': '9272cdcd-aa9e-4f22-995d-b66d73f0510d',
    'site': '135d2f34-9edf-439a-bfc5-5b47b625f2c8',
    'page': '4c401b85-b9d2-4a64-896b-b1a941c9b894',
    'time_created': '2024-02-28T18:15:40.914342Z',
    'time_completed': '2024-02-28T18:17:40.309734Z',
    'html': 'https://storage-scanerr.sfo3.digitaloceanspaces.com/static/sites/135d2f34-9edf-439a-bfc5-5b47b625f2c8/4c401b85-b9d2-4a64-896b-b1a941c9b894/9272cdcd-a9e-4f22-995d-b66d73f0510d/41dcbdfb-6d6a-4fac-9b5d-0e8ef5ccca6a.txt',
    'logs': [
        {
            'level': 'SEVERE',
            'source': 'network',
            'message': 'https://example.com/?wc-ajax=get_refreshed_fragments - Failed to load resource: the server responded with a status of 406 ()',
            'timestamp': 1709144155014
        },
    ],
    'lighthouse': {
        'audits': 'https://storage-scanerr.sfo3.digitaloceanspaces.com/static/sites/135d2f34-9edf-439a-bfc5-5b47b625f2c8/4c401b85-b9d2-4a64-896b-b1a941c9b894/9272cdcd-aa9e-4f22-995d-b66d73f0510d/1a271b85-9f5c-4ead-9566-e95b2f3776c8.json',
        'failed': False,
        'scores': {'pwa': 38, 'seo': 82, 'crux': None, 'average': 65, 'performance': 29, 'accessibility': 96, 'best_practices': 78}
    },
    'yellowlab': {
        'audits': 'https://storage-scanerr.sfo3.digitaloceanspaces.com/static/sites/135d2f34-9edf-439a-bfc5-5b47b625f2c8/4c401b85-b9d2-4a64-896b-b1a941c9b894/9272cdcd-aa9e-4f22-995d-b66d73f0510d/b441d745-5034-4615-bc82-1ced87f89cc7.json',
        'failed': False,
        'scores': {
            'fonts': 41,
            'badCSS': 55,
            'jQuery': 100,
            'requests': 98,
            'pageWeight': 90,
            'globalScore': 60,
            'serverConfig': 76,
            'badJavascript': 99,
            'cssComplexity': 26,
            'domComplexity': 97,
            'javascriptComplexity': -93
        }
    },
    'images': [
        {
            'id': '3425bd74-e04e-4783-a151-6cd43699e6f6',
            'url': 'https://storage-scanerr.sfo3.digitaloceanspaces.com/static/sites/135d2f34-9edf-439a-bfc5-5b47b625f2c8/4c401b85-b9d2-4a64-896b-b1a941c9b894/9272cdcd-aa9e-4f22-995d-b66d73f0510d/3425bd74-e04e-4783-a151-6cd43699e6f6.png',
            'path': 'static/sites/135d2f34-9edf-439a-bfc5-5b47b625f2c8/4c401b85-b9d2-4a64-896b-b1a941c9b894/9272cdcd-aa9e-4f22-995d-b66d73f0510d/3425bd74-e04e-4783-a151-6cd43699e6f6.png',
            'index': 0
        }
    ],
    'configs': {
        'device': 'desktop',
        'driver': 'selenium',
        'timeout': 300,
        'interval': 5,
        'mask_ids': None,
        'auto_height': True,
        'window_size': '1920,1080',
        'max_wait_time': 60,
        'min_wait_time': 10,
        'disable_animations': False
    },
    'tags': None,
    'type': ['html', 'logs', 'vrt', 'lighthouse', 'yellowlab']
}

Last Updated:
Contributors: Landon