From 1c8296b7104157b08d0feddf9e82fd8f3b743d60 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 2 Apr 2022 06:36:40 +0530 Subject: [PATCH] ... --- src/calibre/scraper/simple.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/scraper/simple.py b/src/calibre/scraper/simple.py index 60f79a44b7..257eef7ad9 100644 --- a/src/calibre/scraper/simple.py +++ b/src/calibre/scraper/simple.py @@ -119,9 +119,10 @@ class SimpleScraper(QWebEnginePage): app.processEvents(QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) ans = self.current_fetch.get('html') if ans is None: + eurl = fetching_url.toString() if self.current_fetch['working']: - raise ValueError(f'Timed out loading HTML from {url_or_qurl}') - raise ValueError(f'Failed to load HTML from {url_or_qurl}') + raise TimeoutError(f'Timed out loading HTML from: {eurl}') + raise ValueError(f'Failed to load HTML from: {eurl}') return ans finally: del self.current_fetch