前端截取url成图片

阅读更多

 

   有些小需求需要将 url 转成图片, 直接使用 google的 api即可

https://developers.google.com/speed/docs/insights/v2/reference/pagespeedapi/runpagespeed

 

Request

HTTP request

 
GET https://www.googleapis.com/pagespeedonline/v2/runPagespeed

Parameters

Parameter name Value Description
Required query parameters
url string The URL to fetch and analyze
Optional query parameters
filter_third_party_resources boolean Indicates if third party resources should be filtered out before PageSpeed analysis. (Default: false)
locale string The locale used to localize formatted results
rule string A PageSpeed rule to run; if none are given, all rules are run
screenshot boolean Indicates if binary data containing a screenshot should be included (Default: false)
strategy string The analysis strategy to use 

Acceptable values are:
  • "desktop": Fetch and analyze the URL for desktop browsers
  • "mobile": Fetch and analyze the URL for mobile devices

 

   




  
    
    IIIII
    
    
    
  

  
    
    

 

 

 

你可能感兴趣的:(前端截取url成图片)