On Feb 28, 10:50 am, Alex Borghgraef
wrote:
> I'll still have to find out a way to get this thing working with proxy
> enabled if I ever want to connect it to our overall network.
Ok, doing os.environ['http_proxy']='' before importing urllib2 seems
to do the trick for that.
--
Alex
--
http:/
On Feb 28, 1:36 am, Steven D'Aprano wrote:
> On Mon, 27 Feb 2012 12:48:27 -0800, Alex Borghgraef wrote:
> > Hi all,
>
> > Some time ago I've written some python code to read video data off an IP
> > camera connected via a router to a laptop. Now I try to run this code on
> > a different laptop and
On Mon, 27 Feb 2012 12:48:27 -0800, Alex Borghgraef wrote:
> Hi all,
>
> Some time ago I've written some python code to read video data off an IP
> camera connected via a router to a laptop. Now I try to run this code on
> a different laptop and router combination, but now I can't access the
> ca
Hi all,
Some time ago I've written some python code to read video data off an
IP camera connected via a router to a laptop. Now I try to run this
code on a different laptop and router combination, but now I can't
access the camera.
Some minimal example code:
import urllib2
url = urllib2.urlo
Good point.
The two machines that the code works with are running python 2.6.1 and 2.7.2
and are running on my Mac (Snow Leopard)
The two non-working machines are running python 2.6.6 and 2.7.1 and are on
Debian 6 and Debian 5 respectively. They are VPSs managed by different
providers.
All of
It might help to give more information about the machines. In
particular, what versions of Python are on the production machines?
Devin
On Sun, Sep 25, 2011 at 8:31 AM, Timmy O'Mahony
wrote:
> Hey, I have a question on Stackoverflow at the moment that I thought I would
> put up here as it might
Hey, I have a question on Stackoverflow at the moment that I thought I would
put up here as it might get some more eyes (It has a bounty so feel free to
answer there if you have a SO account!)
I have some test code (as a part of a webapp) that uses urllib2 to perform an
operation I would
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
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 this :
post = urllib.
Quoth Muddy Coder :
> Hi Folks,
>
> I encrountered a problem of using urllib2: the space handling. Look at
> the code below:
>
> import urllib2
> url = r'http://somedomain.com/a.cgi?name=muddy coder&password=foobar
> cgi_back = urllib2.urlopen(url).read()
>
> In this cgi_back, I saw field passwo
Hi Folks,
I encrountered a problem of using urllib2: the space handling. Look at
the code below:
import urllib2
url = r'http://somedomain.com/a.cgi?name=muddy coder&password=foobar
cgi_back = urllib2.urlopen(url).read()
In this cgi_back, I saw field password worked fine, but field name
not, only
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
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
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'),
('Accept','text/xml,application/xml,application/xhtml+xml,t
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
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
Hi all,
I have just moved to a new machine, and so have installed the latest
version of Python (2.4.3 - previously I believe I was running 2.4.2).
Unfortunately this seems to have broken urllib2...
An app I wrote for testing our web application makes heavy use of
urllib2 against the localhost, an
"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
List,
I'm relatively new to using python for interacting with webpages but
Ive run into a problem that really has me stumped. I wrote a script
that would figure out all the variables needed to request data from a
website. I originally just used urllib.urlopen and everything worked
fine on my
[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
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 type
http://server/cgi-bin/test reques
21 matches
Mail list logo