From e0cd878606e151f3525116a355364457a4095c31 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 5 Jul 2016 14:10:31 +0200 Subject: [PATCH] Fix/tunnel mhtml downloads --- qutebrowser/browser/webkit/mhtml.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qutebrowser/browser/webkit/mhtml.py b/qutebrowser/browser/webkit/mhtml.py index f7c1be119..e319acfdf 100644 --- a/qutebrowser/browser/webkit/mhtml.py +++ b/qutebrowser/browser/webkit/mhtml.py @@ -237,7 +237,7 @@ class _Downloader: self.web_view = web_view self.dest = dest self.writer = None - self.loaded_urls = {web_view.url()} + self.loaded_urls = {web_view.cur_url} self.pending_downloads = set() self._finished_file = False self._used = False @@ -252,8 +252,10 @@ class _Downloader: if self._used: raise ValueError("Downloader already used") self._used = True - web_url = self.web_view.url() - web_frame = self.web_view.page().mainFrame() + web_url = self.web_view.cur_url + + # FIXME:refactor have a proper API for this + web_frame = self.web_view._widget.page().mainFrame() self.writer = MHTMLWriter( web_frame.toHtml().encode('utf-8'),