Waiting for a website to load completely with WebKitGTK+ [duplicate]
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Webkit GTK: Determine when a document is finished loading I want to fetch a website's HTML contents with WebKitGTK+ to handle the javascript redirections automatically. I am using the following Python code: def scanURL(domain, retries=3): status = 0 loading = 0 browser = webkit.WebView() browser.open('http://' + domain) while browser.get_load_status() < 2: continue if browser.get_load_status() == 4: if retries