如何使用httpwatch自动分析网页数据
1个回答
展开全部
plugin.Stop()
Entries =plugin.Log.Pages.Item(0).Entries
summary = Entries.summary
# Get Response Header andprint it
responsecount = Entries.Item(0).Response.Headers.Count
print"Response Header: "
foriinrange(responsecount):
printEntries.Item(0).Response.Headers.Item(i).Name +':',
printEntries.Item(0).Response.Headers.Item(i).Value
# Get Performance and printit
ifplugin.Log.Pages.Count !=0:
print"Page Title:",plugin.Log.Pages(0).Title
print"DNS Lookups(ms): ", summary.DNSLookUps
print"Total timeto load page (secs):", summary.Time
print"DownloadedData:", summary.BytesReceived
print"HTTPcompression savings(bytes):", summary.CompressionSavedBytes
print"Number ofround trips: ", summary.RoundTrips
print"Numberof errors: ", summary.Errors.Count
Entries =plugin.Log.Pages.Item(0).Entries
summary = Entries.summary
# Get Response Header andprint it
responsecount = Entries.Item(0).Response.Headers.Count
print"Response Header: "
foriinrange(responsecount):
printEntries.Item(0).Response.Headers.Item(i).Name +':',
printEntries.Item(0).Response.Headers.Item(i).Value
# Get Performance and printit
ifplugin.Log.Pages.Count !=0:
print"Page Title:",plugin.Log.Pages(0).Title
print"DNS Lookups(ms): ", summary.DNSLookUps
print"Total timeto load page (secs):", summary.Time
print"DownloadedData:", summary.BytesReceived
print"HTTPcompression savings(bytes):", summary.CompressionSavedBytes
print"Number ofround trips: ", summary.RoundTrips
print"Numberof errors: ", summary.Errors.Count
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询