jeudi 10 novembre 2016

Measuring Webpage Loadtime using Python

I've been trying to measure the webpage loadtime using Python.

I've tried using requests module, urllib, etc. The code I've used is shown below, using google as example. import requests import time

start = time.time()
gos = requests.get('http://www.google.com')
gos.content
end = time.time()- start
print(end)

This works for google but does not work for the page I am trying to assess - it's a intranet webpage. When I print the content of the problematic page on the console, it simply displays

b''




Aucun commentaire:

Enregistrer un commentaire