Re: urllib2 problem, data param not working? : DISREGARD

2009-04-01 Thread Gabriel Rossetti
Gabriel Rossetti wrote: Hello everyone, I am having a problem with urllib2, when I do this : post = urllib.urlencode(post) request = urllib2.Request(url, post) response = urllib2.urlopen(request) or this : post = urllib.urlencode(post) response = urllib2.urlopen(url, post) or

Re: URLLIb2 problem

2008-06-30 Thread Jerry Hill
On Mon, Jun 30, 2008 at 4:11 PM, <[EMAIL PROTECTED]> wrote: > I am trying to write somecode of this kind :) > > opener = urllib2.build_opener(urllib2.HTTPCookieProcessor()) > opener.addheaders = [ ... > ('Accept-Encoding','gzip,deflate'), ... > urllib2.install_opener(opener) > > fu = urllib2.urlop

Re: URLLIb2 problem

2008-06-30 Thread Fuzzyman
On Jun 30, 9:11 pm, [EMAIL PROTECTED] wrote: > I am trying to write somecode of this kind :) > > opener = urllib2.build_opener(urllib2.HTTPCookieProcessor()) > opener.addheaders = [('User-Agent','Mozilla/5.0 (Windows; U; Windows > NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'), > ('A

Re: urllib2 problem with ports.

2006-06-16 Thread Ant
Fredrik Lundh wrote: > check your proxy configuration. most likely, your new machine is set up > to route all requests via a remote proxy. Here's me looking like a fool :-) The parts of the machine (eg Firefox, GAIM etc) that I'd set up use a direct connection - it looks like the guy who'd had

Re: urllib2 problem with ports.

2006-06-15 Thread Fredrik Lundh
Ant wrote: > This gives the output (Stack trace snipped - can post if required): > > urllib2.HTTPError: HTTP Error 502: Proxy Error ( The Uniform Resource > Locator (URL) does not use a recognized protocol. Either the protocol > This I believe is a problem with the addition of a non-default port

Re: urllib2 problem

2005-10-28 Thread John J. Lee
"Jeremy Martin" <[EMAIL PROTECTED]> writes: [...] > website. I originally just used urllib.urlopen and everything worked > fine on my Windows PC at work. I tried the same script at home on my > Fedora COre 3 box using python 2.4, and whenever I try to connect to > the site I get the (110, Connec

Re: urllib2 problem/bug: Request.add_header does() nothing?

2005-07-27 Thread Fuzzyman
[EMAIL PROTECTED] wrote: > I have a simple cgi-script on a server that prints all key-value pairs > from a request. And it really works when i use a browser and type smth > like http://server/cgi-bin/test?name=mike&johny=dummy. But when I use > the following script, nothing is printed (like i typ