python mechanize proxy support question

Discussion in 'Python' started by elca, Jan 4, 2010.

  1. elca

    elca Guest

    Hello All

    Happy New Year!

    i have some question about python mechanize 's proxy support.

    im making some web client script, and i would like to insert proxy support

    function into my script.

    for example ,if i have such like following some script.

    how can i add proxy support into my mechanize script?

    i was look for some reference , but not so much good hint from google.

    params = urllib.urlencode({'id':id, 'passwd':pw})
    rq = mechanize.Request("http://www.example.com" params)
    rs = mechanize.urlopen(rq)

    whenever i open this 'www.example.com' website , i would like open go
    through proxy.

    Thanks in advance!
    --
    View this message in context: http://old.nabble.com/python-mechanize-proxy-support-question-tp27009696p27009696.html
    Sent from the Python - python-list mailing list archive at Nabble.com.
     
    elca, Jan 4, 2010
    #1
    1. Advertising

  2. elca

    alex23 Guest

    On Jan 4, 5:42 pm, elca <> wrote:
    > how can i add proxy support into my mechanize script?
    > i was look for some reference , but not so much good hint from google.


    There are examples on using proxies with mechanize on the module's
    home page:
    http://wwwsearch.sourceforge.net/mechanize/
     
    alex23, Jan 4, 2010
    #2
    1. Advertising

  3. elca

    elca Guest

    alex23 wrote:
    >
    > On Jan 4, 5:42 pm, elca <> wrote:
    >> how can i add proxy support into my mechanize script?
    >> i was look for some reference , but not so much good hint from google.

    >
    > There are examples on using proxies with mechanize on the module's
    > home page:
    > http://wwwsearch.sourceforge.net/mechanize/
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >
    >


    HI..
    that is only support mechanize.browser module.. actually
    im looking mechanize.urlopen method.
    thanks
    --
    View this message in context: http://old.nabble.com/python-mechanize-proxy-support-question-tp27009696p27011661.html
    Sent from the Python - python-list mailing list archive at Nabble.com.
     
    elca, Jan 4, 2010
    #3
  4. elca

    alex23 Guest

    On Jan 4, 9:25 pm, elca <> wrote:
    > that is only support mechanize.browser module.. actually
    > im looking mechanize.urlopen method.


    From the docs:

    In these examples, the workings are hidden inside the mechanize.urlopen
    () function, which is an extension of urllib2.urlopen(). Redirects,
    proxies and cookies are handled automatically by this function (note
    that you may need a bit of configuration to get your proxies correctly
    set up: see urllib2 documentation).

    http://wwwsearch.sourceforge.net/mechanize/doc.html
     
    alex23, Jan 5, 2010
    #4
    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. vidy5300
    Replies:
    0
    Views:
    918
    vidy5300
    Jun 7, 2004
  2. Replies:
    0
    Views:
    1,666
  3. Klein Stéphane
    Replies:
    3
    Views:
    621
    Steve Holden
    Dec 20, 2009
  4. elca
    Replies:
    0
    Views:
    817
  5. Mark
    Replies:
    0
    Views:
    361
Loading...

Share This Page