[Python-modules-team] Bug#523149: Qt WebKit: Can't get whole site content

Sebastian Linke Seb_Linke at web.de
Wed Apr 8 18:23:13 UTC 2009


Package: python-qt4
Version: 4.4.2-4
Severity: normal

Hi,

when trying to read the HTML source code of a site via QWebFrame.toHtml(), I can only get the `head`-element.



Code to reproduce:

from PyQt4 import QtCore, QtGui, QtWebKit
import sys

app = QtGui.QApplication(sys.argv)

webview = QtWebKit.QWebView()
webview.load(QtCore.QUrl('http://www.google.com/'))

def print_content():
    print webview.page().mainFrame().toHtml()

QtCore.QObject.connect(webview, QtCore.SIGNAL('urlChanged(QUrl)'), print_content)
    
webview.show()

app.exec_()



...shows this:

~$ python test.py
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title></head></html>



...but I would like to see the whole content, because the documentation says:

"Returns the frame's content, converted to HTML."

Regards

Sebastian



-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-486
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-qt4 depends on:
ii  libc6                         2.9-4      GNU C Library: Shared libraries
ii  libgcc1                       1:4.3.3-3  GCC support library
ii  libqt4-assistant              4.5.0-2    Qt 4 assistant module
ii  libqt4-designer               4.5.0-2    Qt 4 designer module
ii  libqt4-help                   4.5.0-2    Qt 4 help module
ii  libqt4-network                4.5.0-2    Qt 4 network module
ii  libqt4-script                 4.5.0-2    Qt 4 script module
ii  libqt4-svg                    4.5.0-2    Qt 4 SVG module
ii  libqt4-test                   4.5.0-2    Qt 4 test module
ii  libqt4-webkit                 4.5.0-2    Qt 4 WebKit module
ii  libqt4-xml                    4.5.0-2    Qt 4 XML module
ii  libqt4-xmlpatterns            4.5.0-2    Qt 4 XML patterns module
ii  libqtcore4                    4.5.0-2    Qt 4 core module
ii  libqtgui4                     4.5.0-2    Qt 4 GUI module
ii  libstdc++6                    4.3.3-3    The GNU Standard C++ Library v3
ii  python                        2.5.4-2    An interactive high-level object-o
ii  python-central                0.6.11     register and build utility for Pyt
ii  python-elementtree            1.2.6-12   Light-weight toolkit for XML proce
ii  python-qt4-common             4.4.2-4    Shared files for PyQt4
ii  python-sip4                   4.7.6-1    Python/C++ bindings generator runt
ii  python2.5                     2.5.4-1    An interactive high-level object-o

python-qt4 recommends no packages.

Versions of packages python-qt4 suggests:
pn  python-qt4-dbg                <none>     (no description available)

-- no debconf information
____________________________________________________________________
Psssst! Schon vom neuen WEB.DE MultiMessenger gehört? 
Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123






More information about the Python-modules-team mailing list