Skip to content

Commit

Permalink
Fixed wrong (untested :/) changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsMichelsen committed Dec 26, 2014
1 parent d9dd58c commit 80d42ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webkit2png/webkit2png.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,17 +257,17 @@ 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)
self._page.networkAccessManager().setCookieJar(self.cookieJar)

# 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)

Expand Down

0 comments on commit 80d42ff

Please sign in to comment.