Some hacks for mechanize

Discussion in 'Ruby' started by zwen, Sep 19, 2005.

  1. zwen

    zwen Guest

    Hi,
    I am a ruby newbie hacking on the Mechanize. Some of my changes over
    the 0.3.1 version mechanize.

    1) make it support http-proxy
    add a method of
    def set_proxy(addr,port,user=nil,pass=nil)
    @proxy_addr, @proxy_port,@proxy_user,@proxy_pass = addr,port,user,pass
    end

    replace the http setup in the fetch_page method as
    http = Net::HTTP.new(uri.host, uri.port,@proxy_addr,
    @proxy_port,@proxy_user,@proxy_pass)

    2) a 'bug' of input type textbox.
    <input type="textbox" ...> is ignored in the current form fields.
    add "textbox" in the method parse in GlobalForm as
    when 'text', 'password', 'hidden', 'int','textbox'

    Just my 2 cents
    Enjoy hacking...
     
    zwen, Sep 19, 2005
    #1
    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. =?Utf-8?B?SG9tYW0=?=

    How to avoid lifecycle hacks?

    =?Utf-8?B?SG9tYW0=?=, Mar 3, 2005, in forum: ASP .Net
    Replies:
    11
    Views:
    642
    =?Utf-8?B?SG9tYW0=?=
    Mar 3, 2005
  2. Eric Pinnell
    Replies:
    5
    Views:
    602
  3. Veritech

    CSS hacks

    Veritech, Jul 15, 2005, in forum: HTML
    Replies:
    2
    Views:
    574
    Veritech
    Jul 16, 2005
  4. Nick Coghlan
    Replies:
    8
    Views:
    406
    Carl Banks
    Mar 10, 2005
  5. Andy Dingley
    Replies:
    7
    Views:
    563
    Andy Dingley
    Mar 19, 2007
Loading...

Share This Page