mary Posted April 30, 2007 Posted April 30, 2007 Hi! Please, I need your help to handle decompression html page. Here is my code if I send the following to in my request $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", "http://www.stylephreak.com/index.php/archives/2004/08/standard-forms/") [b]$oHTTP.SetRequestHeader("Accept-Encoding", "gzip,deflate")[/b] ; to get a compressed html page $oHTTP.Send() And then the Content-Encoding header in the response is 'gzip' or 'deflate'. How can I uncompress the content? thinks a lot
evilertoaster Posted April 30, 2007 Posted April 30, 2007 Never done work with it personally, but here are some links that may help you from a google search-http://blogs.msdn.com/wndp/archive/2006/08...ntent-Type.aspxhttp://www.experts-exchange.com/Programmin...Q_20939122.htmlhttp://coding.derkeiler.com/Archive/Perl/c...04-12/0226.html
DaleHohm Posted April 30, 2007 Posted April 30, 2007 I suppose you're looking for something more elegant than 1) save the response to a file, 2) inflate the file with gunzip? Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
mary Posted April 30, 2007 Author Posted April 30, 2007 Never done work with it personally, but here are some links that may help you from a google search-http://blogs.msdn.com/wndp/archive/2006/08...ntent-Type.aspxhttp://www.experts-exchange.com/Programmin...Q_20939122.htmlhttp://coding.derkeiler.com/Archive/Perl/c...04-12/0226.htmlthinks, but there is no solution at all in theses links.
evilertoaster Posted April 30, 2007 Posted April 30, 2007 thinks, but there is no solution at all in theses links.o? They seemed to resolve exactly what you asked in the thread (using perl but same concept)http://coding.derkeiler.com/Archive/Perl/c...04-12/0625.htmlor is this not applicable?
mary Posted May 1, 2007 Author Posted May 1, 2007 (edited) o? They seemed to resolve exactly what you asked in the thread (using perl but same concept)http://coding.derkeiler.com/Archive/Perl/c...04-12/0625.htmlor is this not applicable?the solution is given for perl with an embeded perl decompression library. Autoit have not a similar libraryI suppose you're looking for something more elegant than 1) save the response to a file, 2) inflate the file with gunzip?Dalethis solution needs a lot of disk access specially when you send many httprequest Edited May 1, 2007 by mary
drlava Posted July 16, 2007 Posted July 16, 2007 Hi, I am interested in this too. Did you ever find a good solution? thanks.
drlava Posted July 17, 2007 Posted July 17, 2007 Ok, I have a solution.First, I modified InetGet (or _InetGetPro) so that it could retreive binary dataThen, I recompiled zlib.dll (zlib 1.2.3) so that the uncompress export could accept a variable zMode, which specifies gzip or zlib compressed data.After amking the proper dll data structures, it's not too hard to do. Included in the zip file is the modified _InetGetPro and zlib1.dll, with header info.Also, perhaps most importantly, I included a working example showing pure memory gzip http download and decompression, and a file gzip access example. I can't post this in the example scripts section for some reason, it says I'm not allowed.. so here it is:gzip_binary_InetGet.zip Enjoy, and I appreciate your feedback.
Sypher Posted September 24, 2007 Posted September 24, 2007 Hmm i can't get it to work It crashes and gives an error at: INetPro.au3 (194) : ==> Subscript used with non-Array variable.: ElseIf $ai_ICU[0] = 0 Then ElseIf $ai_ICU^ ERROR
ParoXsitiC Posted July 11, 2010 Posted July 11, 2010 Anyone know if there is a better solution or a resubmit of the zip file? The URL no longer works ;\
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now