Google Page Speed Insights – 基本authentication

我目前使用npm psi来对可公开访问的站点(基本authentication除外)进行psitesting。

我所有的尝试使用用户名:密码@约会迄今为止只有psi和psi的失败。

我想知道我是否错过了什么?

 { [Error: PageSpeed is currently unable to fetch this URL. Please try again later.] code: 400, noStack: true } 

您需要创build一个API密钥,然后在请求中使用该密钥

 curl 'https://www.googleapis.com/pagespeedonline/v2/runPagespeed?url=YOUR_URL_HERE&key=XXX_YOUR_API_KEY_HERE'; 

按照这些说明https://developers.google.com/speed/docs/insights/v2/first-app#before_starting