Skip to content

A python script that calls the pagespeed api and requests URLs be run. The JSON returned is filtered to only include desired metrics, they are then saved to a local csv for analysis.

Notifications You must be signed in to change notification settings

kapziel/google-pagespeed-api-script

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Pagespeed API - Python

  1. This script reads urls from 'pagespeed.txt' file. Load this file with full URLS - make sure to include https:// parameters (will add in URL validation in future)
  2. Queries each url with the google pagespeed api.
  3. Filters JSON results to only include desired metrics.
  4. Metrics are saved to local .csv spreadsheet for analysis.

Current columns are

  • URL
  • First Contentful Paint
  • First Meaningful Paint
  • Speed Index
  • First CPU Idle
  • Time to interactive

Requires

  • Requests

Note

.gitignore hides api token file, this is loaded in via a .txt file. If no files exists None is used and script will contine without. To use in production (multiple calls / sec) an api token will be required.

About

A python script that calls the pagespeed api and requests URLs be run. The JSON returned is filtered to only include desired metrics, they are then saved to a local csv for analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%