Re: FTP with urllib2 behind a proxy

Discussion in 'Python' started by Bob McCormick, Feb 25, 2004.

  1. Hello,
    I came across this email thread, and I can't seem to get the
    examples to work.
    I am running Proxy+ proxy server. It sets up HTTP proxy on port
    4480, cnad FTP proxy on 4421.
    I'm not sure how to add the IP addr & host of the proxy server to
    the authorization. Is it something like:
    proxyauth = "http://anonymous@me:137.134.5.20:4421"
    proxy_handler = urllib2.ProxyHandler( { 'http' : proxyauth, 'ftp'
    : proxyauth})

    When I try this, and then try
    urllib2.urlopen("ftp://ftp.mathcs.emory.edu/pub/misc/emacs")
    I get

    urllib2.URLError: <urlopen error (1, 'address family not supported')>

    Does this mean that I don't have an FTP handler defined?

    As far as I know, I don't need any special authorizaiton to access my proxy
    server, just the IP and host.

    Also, the python doc mentioned in the FTPHandler that it uses blank for
    user and password. Is this really correct? Will this work? Most sites
    want "anonymous" and an email addr.

    Thanks for any help or pointers that you can provide.


    --
    Bob McCormick email:

    Rocket Software Inc., OSS Business Unit
    (formerly TCSI Corp.) voice: +1 510-749-8720
    1080 Marina Village Parkway fax: +1 510-749-8700
    Alameda, CA 94501-1046 USA www: http://www.rocketsoftware.com
     
    Bob McCormick, Feb 25, 2004
    #1
    1. Advertising

  2. > proxyauth = "http://anonymous@me:137.134.5.20:4421"

    If the above is what you are using, then that is your issue.
    The above should be; "http://anonymous:me@137.134.5.20:4421"

    As for your other problem, I have no idea.

    - Josiah
     
    Josiah Carlson, Feb 25, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. O. Koch

    FTP with urllib2 behind a proxy

    O. Koch, Aug 7, 2003, in forum: Python
    Replies:
    4
    Views:
    1,340
    John J. Lee
    Aug 14, 2003
  2. Bob McCormick

    Re: FTP with urllib2 behind a proxy

    Bob McCormick, Feb 25, 2004, in forum: Python
    Replies:
    0
    Views:
    398
    Bob McCormick
    Feb 25, 2004
  3. Martin Brodbeck

    FTP, Proxy and urllib2

    Martin Brodbeck, Jun 7, 2004, in forum: Python
    Replies:
    4
    Views:
    1,738
    Martin Brodbeck
    Jun 8, 2004
  4. jakecjacobson

    FTP example going through a FTP Proxy

    jakecjacobson, Jan 7, 2009, in forum: Python
    Replies:
    3
    Views:
    2,136
    jakecjacobson
    Jan 8, 2009
  5. D. Buck
    Replies:
    2
    Views:
    596
    D. Buck
    Jun 29, 2004
Loading...

Share This Page