Help with Mechanize Forms please?
#1
Question 
I have this below site that I am trying to access the form for, so I could login. But it seems that I am not able to get the form when I issue the command browser.select_form below, instead I get an error log. I have this other plugin with the exact same code, and that works fine. What might I be doing wrong here. Any help would be greatly appreciated.

http://www.cyberviewtv.org/member/member.php

Python Code Snipet:

loginurl = 'http://www.cyberviewtv.org/member/member.php'
USER_AGENT = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
cj = mechanize.LWPCookieJar()
opener = mechanize.build_opener(mechanize.HTTPCookieProcessor(cj))
opener.addheaders = [("User-agent", USER_AGENT)]

browser = mechanize.Browser()
browser.addheaders = [("User-agent", USER_AGENT)]
browser.set_cookiejar(cj)
browser.open(loginurl)
browser.select_form(nr=0)
Reply
#2
nevermind, found a solution for this.
Reply

Logout Mark Read Team Forum Stats Members Help
Help with Mechanize Forms please?0