Re: Deflate with urllib2...

2008-09-19 Thread Sam
Gabriel... Awesome! Thank you so much for the solution. And yeah, I found exactly one website that strangely enough only does deflate, not gzip. I'd rather not say what website it is, since it's small and not mine. They may be few and in between, but they do exist. Thanks On Sep 19, 3:48 am

Re: Deflate with urllib2... (solved)

2008-09-19 Thread Gabriel Genellina
En Thu, 18 Sep 2008 23:29:30 -0300, Sam <[EMAIL PROTECTED]> escribió: On Sep 18, 2:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: En Tue, 16 Sep 2008 21:58:31 -0300, Sam <[EMAIL PROTECTED]> escribió: The code is correct - try with another server. I tested it with a   LightHTTPd server an

Re: Deflate with urllib2...

2008-09-19 Thread Gabriel Genellina
En Thu, 18 Sep 2008 23:29:30 -0300, Sam <[EMAIL PROTECTED]> escribió: On Sep 18, 2:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: En Tue, 16 Sep 2008 21:58:31 -0300, Sam <[EMAIL PROTECTED]> escribió: The code is correct - try with another server. I tested it with a   LightHTTPd server and

Re: Deflate with urllib2...

2008-09-18 Thread Sam
For those that are interested, but don't want to bother running the program themselves, here's the output I get. Trying: http://slashdot.org http://slashdot.org - Apache/1.3.41 (Unix) mod_perl/1.31-rc4 (deflate) Errored out on this site. Trying: http://www.hotmail.com http://www.hotmail.c

Re: Deflate with urllib2...

2008-09-18 Thread Sam
On Sep 18, 2:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 16 Sep 2008 21:58:31 -0300, Sam <[EMAIL PROTECTED]> escribió: > The code is correct - try with another server. I tested it with a   > LightHTTPd server and worked fine. Gabriel... I found a bunch of servers to test it on

Re: Deflate with urllib2...

2008-09-18 Thread Gabriel Genellina
En Tue, 16 Sep 2008 21:58:31 -0300, Sam <[EMAIL PROTECTED]> escribió: Gabriel, et al. It's hard to find a web site that uses deflate these days. Luckily, slashdot to the rescue. I even wrote a test script. If someone can tell me what's wrong that would be great. Here's what I get when I run

Re: Deflate with urllib2...

2008-09-16 Thread Sam
Gabriel, et al. It's hard to find a web site that uses deflate these days. Luckily, slashdot to the rescue. I even wrote a test script. If someone can tell me what's wrong that would be great. Here's what I get when I run it: Data is compressed using deflate. Length is: 107160 Traceback (mo

Re: Deflate with urllib2...

2008-09-10 Thread Gabriel Genellina
En Tue, 09 Sep 2008 16:38:54 -0300, Sam <[EMAIL PROTECTED]> escribió: I'm using urllib2 and accepting gzip and deflate. It turns out that almost every site returns either normal text or gzip. But I finally found one that returns deflate. Here's how I un-gzip: compressedstream = StringIO.St

Re: Deflate with urllib2...

2008-09-09 Thread Mohamed Yousef
Try this http://www.paul.sladen.org/projects/pyflate/ 2008/9/9 Sam <[EMAIL PROTECTED]>: > I'm using urllib2 and accepting gzip and deflate. > > It turns out that almost every site returns either normal text or > gzip. But I finally found one that returns deflate. > > Here's how I un-gzip: > com