Stop fetching once dom is ready

This commit is contained in:
Kovid Goyal 2022-04-02 09:04:49 +05:30
parent 1c2ca981d8
commit a1096d303d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -108,6 +108,7 @@ class SimpleScraper(QWebEnginePage):
if self.is_being_tested:
self.print(f'domready: {self.is_current_url=}')
if self.is_current_url:
self.triggerAction(QWebEnginePage.WebAction.Stop)
self.current_fetch['working'] = False
if not msg.get('failed'):
self.current_fetch['html'] = msg['html']