yagabey
28th December 2008, 01:01
Hello,
I am trying to connect to a webpage and save it as an html document.
that code:
QUrl url(finalLink);
QString queryParttemp = finalLink;
QString queryPart = queryParttemp.remove(url.host());
queryPart.remove("http://");
QHttpRequestHeader header("GET", queryPart);
header.setValue("Host", url.host());
httpInstance.request(header,0,&htmlFile);
usually works; but sometimes not..
for example, a page from link:
http://www.radikal.com.tr/default.aspx?aType=HaberDetay&ArticleID=914625
cannot be saved. I noticed something; when i enter this link on a web browser, the link automatically changes to:
http://www.radikal.com.tr/Radikal.aspx?aType=RadikalHaberDetay&ArticleID=914625
Perhaps that is the reason why i cannot save the file..
What should i do to save the result of that request(that html doc)?
Thanks in advance...
I am trying to connect to a webpage and save it as an html document.
that code:
QUrl url(finalLink);
QString queryParttemp = finalLink;
QString queryPart = queryParttemp.remove(url.host());
queryPart.remove("http://");
QHttpRequestHeader header("GET", queryPart);
header.setValue("Host", url.host());
httpInstance.request(header,0,&htmlFile);
usually works; but sometimes not..
for example, a page from link:
http://www.radikal.com.tr/default.aspx?aType=HaberDetay&ArticleID=914625
cannot be saved. I noticed something; when i enter this link on a web browser, the link automatically changes to:
http://www.radikal.com.tr/Radikal.aspx?aType=RadikalHaberDetay&ArticleID=914625
Perhaps that is the reason why i cannot save the file..
What should i do to save the result of that request(that html doc)?
Thanks in advance...