FAQ
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.

Search Discussions

  • Alex23 at Jan 4, 2010 at 8:34 am

    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/
  • Elca at Jan 4, 2010 at 11:25 am

    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.
  • Alex23 at Jan 5, 2010 at 1:34 am

    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJan 4, '10 at 7:42a
activeJan 5, '10 at 1:34a
posts4
users2
websitepython.org

2 users in discussion

Alex23: 2 posts Elca: 2 posts

People

Translate

site design / logo © 2022 Grokbase