This commit is contained in:
Kovid Goyal 2022-04-02 06:36:40 +05:30
parent 223444e208
commit 1c8296b710
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -119,9 +119,10 @@ class SimpleScraper(QWebEnginePage):
app.processEvents(QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) app.processEvents(QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents)
ans = self.current_fetch.get('html') ans = self.current_fetch.get('html')
if ans is None: if ans is None:
eurl = fetching_url.toString()
if self.current_fetch['working']: if self.current_fetch['working']:
raise ValueError(f'Timed out loading HTML from {url_or_qurl}') raise TimeoutError(f'Timed out loading HTML from: {eurl}')
raise ValueError(f'Failed to load HTML from {url_or_qurl}') raise ValueError(f'Failed to load HTML from: {eurl}')
return ans return ans
finally: finally:
del self.current_fetch del self.current_fetch