[webkit-qt] webkit-qt Digest, Vol 18, Issue 15
sebastiansony2000 at gmail.com
sebastiansony2000 at gmail.com
Tue Mar 15 07:14:02 PDT 2011
Onion
Beetroot,cabbage(palya)
Lever
Banana
Curd
Sent from BlackBerry® on Airtel
-----Original Message-----
From: webkit-qt-request at lists.webkit.org
Sender: webkit-qt-bounces at lists.webkit.org
Date: Tue, 15 Mar 2011 07:00:11
To: <webkit-qt at lists.webkit.org>
Reply-To: webkit-qt at lists.webkit.org
Subject: webkit-qt Digest, Vol 18, Issue 15
Send webkit-qt mailing list submissions to
webkit-qt at lists.webkit.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
or, via email, send a message with subject or body 'help' to
webkit-qt-request at lists.webkit.org
You can reach the person managing the list at
webkit-qt-owner at lists.webkit.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of webkit-qt digest..."
Today's Topics:
1. how to shutdown QNetworkAccessManager (=?gb2312?B?1tzF9A==?=)
2. Re: how to shutdown QNetworkAccessManager (Markus Goetz)
----------------------------------------------------------------------
Message: 1
Date: Tue, 15 Mar 2011 17:19:15 +0800
From: "=?gb2312?B?1tzF9A==?=" <zhoupeng19 at 126.com>
To: webkit-qt at lists.webkit.org
Subject: [webkit-qt] how to shutdown QNetworkAccessManager
Message-ID: <4D7F2F12.149C86.31879 at m50-112.126.com>
Content-Type: text/plain; charset="gb2312"
Hi,all?
I use QWebFrame()::setHtml() function to load a page from local file system, and this page contains some external resource,but i don't need QNetworkAccessManager to download these stuff for me,because i need to download these through my own crawler.
EG:
<html>
<body>
<script src="http://www.***.com/1.js" language="javascript" type="text/javascript"></script>
<h1>test</h1>
</body>
</html>
1.js:
document.write("<h1>test</h1><img src=http://www.***.com/1.jpg>")
First i use QWebFrame()::setHtml() load this page,because there is a js file need to download,so, i need qtwebkit tell me the url,and i download the js through my crawler. When the js is download,i use QWebFrame()::evaluateJavaScript() to execute it, when call evaluateJavaScript,i need to get the url of the img.This is my expect output :
<html>
<body>
<h1>test</h1><img src=http://www.***.com/1.jpg>
</body>
</html>
So, can anybody tell me :
1) I don't need QNetworkAccessManager to download anything, how to shutdown it?
2) When a page need to load some external resource, how to get the url?
Thanks!
????????ZhouPeng
????????zhoupeng19 at 126.com
??????????2011-03-15
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20110315/4fdff170/attachment-0001.html>
------------------------------
Message: 2
Date: Tue, 15 Mar 2011 10:59:39 +0100
From: Markus Goetz <Markus.Goetz at nokia.com>
To: webkit-qt at lists.webkit.org
Subject: Re: [webkit-qt] how to shutdown QNetworkAccessManager
Message-ID: <201103151059.39365.Markus.Goetz at nokia.com>
Content-Type: Text/Plain; charset="utf-8"
On Tuesday, March 15, 2011 10:19:15 am ext ?? wrote:
> 1) I don't need QNetworkAccessManager to download anything, how to shutdown
> it?
> 2) When a page need to load some external resource, how to get the
> url?
You need to override QNetworkAccessManager::createRequest().
This function is called for every file requested by QtWebkit.
There you can also return a custom QNetworkReply which your crawled data.
See http://doc.qt.nokia.com/qq/32/qq32-webkit-protocols.html
Good luck!
Markus
------------------------------
_______________________________________________
webkit-qt mailing list
webkit-qt at lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
End of webkit-qt Digest, Vol 18, Issue 15
*****************************************
More information about the webkit-qt
mailing list