Results 1 to 3 of 3

Thread: Can't load HTML page with QNetworkReply

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2007
    Location
    Wroclaw, Poland
    Posts
    72
    Thanks
    6
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Can't load HTML page with QNetworkReply

    Hi,
    I want to download data from online shop site. For downloading I'm using QNetworkAccesManager and QNetworkReply. Main page loads correctly and without problem. On of next pages refuses to download and throw error - Host not found.

    Qt Code:
    1. m_ptrPriv->m_pReply = m_ptrPriv->m_NetAccesMgm.get(QNetworkRequest(stUrl));
    2. connect(m_ptrPriv->m_pReply, SIGNAL(finished()), this, SLOT(onPageDownloadFinished()));
    3. connect(m_ptrPriv->m_pReply, SIGNAL(readyRead()),this, SLOT(httpReadyRead()));
    4. connect(m_ptrPriv->m_pReply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(updateDataReadProgress(qint64,qint64)));
    To copy to clipboard, switch view to plain text mode 

    After finished() signal m_pReply contain error mentioned above. URL is http:/www.proline.pl/?p=AMD+X4+II+965+AM3+B.
    I've tried program from QT Network examples - http. He returns the same problem. I can go to that addres by my browsers. HTML code of pages seems a little strange (addition of extra char '3D' in front of each TAG attributes value, which looks like some protection against web crawlers collecting data).
    Any idea how to solve this problem? 'Host not found' suggest that QT couldn't find site by address. I thought that QNetworkReply should deliver HTML page code without parsing or validation - thats why I refuse to use WebKit.
    Last edited by T4ng10r; 18th September 2011 at 19:29.

Similar Threads

  1. Hot do I get HTML source from a web page?
    By earendil in forum Newbie
    Replies: 9
    Last Post: 16th March 2012, 15:15
  2. Html page Display in QWebView
    By Tavit in forum Qt Programming
    Replies: 4
    Last Post: 10th July 2010, 15:39
  3. Load image from QNetworkReply incorrectly
    By tqlong in forum Qt Programming
    Replies: 0
    Last Post: 1st July 2010, 16:51
  4. Load HTML to QTextEdit
    By Gamalof in forum Qt Programming
    Replies: 2
    Last Post: 5th July 2008, 18:08
  5. Widget to display an HTML page ?
    By probine in forum Qt Tools
    Replies: 3
    Last Post: 11th October 2006, 18:55

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.