[PyQt] Is this possible using pyqt?
David Boddie
dboddie at trolltech.com
Mon Sep 7 13:03:39 BST 2009
On Mon Sep 7 12:30:22 BST 2009, jim biri wrote:
> Wonder if anyone can help.
> I'm looking to build a simple command line appln that logs into a website
> (following redirects, using SSL), and clicks on a download link to download
> some files. Nothing fishy here, just looking to automate a mundane and
> manual process.
> Is this possible using pyqt? If so, any pointers as to which
> examples/tutorials might be particularly useful?
Yes, it should be possible with either the network access API or WebKit.
> I've found "/python-qt4-doc/examples/network/http.py", but any others?
> And ... is what I'm trying to do actually doable using pyqt?
There's example code for the following article that shows how to use QHttp,
but it probably doesn't do much more than the example you mention:
http://doc.trolltech.com/qq/qq23-web-service.html
If what you're doing really needs a browser to interact with a Web site then
you should be using QWebView, even if you aren't going to show the browser
window itself. You will need to
1. Connect to the view's loadFinished() signal to a slot somewhere - this is
where you will handle the page contents.
2. Write the slot so that, when the first page is loaded, it finds the
download link and fetches that.
3. Load the first page to start off the process.
David
More information about the PyQt
mailing list