From 80d42ff5b9084bcd4119e48651873c72bb1ec0d7 Mon Sep 17 00:00:00 2001 From: Lars Michelsen Date: Fri, 26 Dec 2014 13:57:43 +0100 Subject: [PATCH] Fixed wrong (untested :/) changes --- webkit2png/webkit2png.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webkit2png/webkit2png.py b/webkit2png/webkit2png.py index 3a78e3a..4ea43a0 100755 --- a/webkit2png/webkit2png.py +++ b/webkit2png/webkit2png.py @@ -257,9 +257,9 @@ def _load_page(self, res, width, height, timeout): url = res if self.encodedUrl: - qtUrl = QUrl.fromEncoded(res) + qtUrl = QUrl.fromEncoded(url) else: - qtUrl = QUrl(res) + qtUrl = QUrl(url) # Set the required cookies, if any self.cookieJar = CookieJar(self.cookies, qtUrl) @@ -267,7 +267,7 @@ def _load_page(self, res, width, height, timeout): # Load the page if type(res) == tuple: - self._page.mainFrame().setHtml(res[0], res[1]) # HTML, baseUrl + self._page.mainFrame().setHtml(res[0], qtUrl) # HTML, baseUrl else: self._page.mainFrame().load(qtUrl)