Time stuff for debug
This commit is contained in:
parent
b9815f4976
commit
d468d76b54
13
BirdyNet.py
13
BirdyNet.py
@ -26,6 +26,7 @@ from qtpy.QtCore import *
|
|||||||
from qtpy.QtMultimedia import QSound
|
from qtpy.QtMultimedia import QSound
|
||||||
import configparser
|
import configparser
|
||||||
import json
|
import json
|
||||||
|
import time
|
||||||
|
|
||||||
os.chdir(sp)
|
os.chdir(sp)
|
||||||
distro = os.path.splitext(s.rsplit(os.path.sep)[-1])[0]
|
distro = os.path.splitext(s.rsplit(os.path.sep)[-1])[0]
|
||||||
@ -119,12 +120,20 @@ class browserWindow(QMainWindow):
|
|||||||
|
|
||||||
def cNavigate(self,event = None):
|
def cNavigate(self,event = None):
|
||||||
try:
|
try:
|
||||||
print(prettyJson(parseUrl(self.cUrlBar.text())))
|
#print(prettyJson(parseUrl(self.cUrlBar.text())))
|
||||||
|
start = time.time()
|
||||||
response = downloadPage(self.cUrlBar.text(),{"User-Agent": self.cUserAgent})
|
response = downloadPage(self.cUrlBar.text(),{"User-Agent": self.cUserAgent})
|
||||||
|
end = time.time()
|
||||||
|
print("Downloading page: " +str(end - start))
|
||||||
|
|
||||||
infoFetcher(response)
|
infoFetcher(response)
|
||||||
self.cDocumentInfo = response
|
self.cDocumentInfo = response
|
||||||
|
|
||||||
|
start = time.time()
|
||||||
self.cDoc.cRenderHtml(response["body"].decode("utf-8",errors="ignore"))
|
self.cDoc.cRenderHtml(response["body"].decode("utf-8",errors="ignore"))
|
||||||
print(prettyJson(response["headers"]))
|
end = time.time()
|
||||||
|
print("Rendering page: " +str(end - start))
|
||||||
|
#print(prettyJson(response["headers"]))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.cDoc.cRenderHtml(str(e))
|
self.cDoc.cRenderHtml(str(e))
|
||||||
raise
|
raise
|
||||||
|
Loading…
Reference in New Issue
Block a user