clientform

How to fix such ClientForm bug?

Hello, the following code from mechanize import Browser br = Browser() page = br.open('http://wow.interzet.ru/news.php?readmore=23') br.form = br.forms().next() print br.form gives me the following error: Traceback (most recent call last): File "C:\Users\roddik\Desktop\mech.py", line 6, in <module> br.form = br.forms().next() ...

Python mechanize doesn't click a button

Hello, check the following script: from mechanize import Browser br = Browser() page = br.open('http://scottishladiespool.com/register.php') br.select_form(nr = 5) r = br.click(type = "submit", nr = 0) print r.data #prints username=&password1=&password2=&email=&user_hide_email=1&captcha_code=&user_msn=&user_yahoo=&user_web=&user_loca...

How to set an nonexistent field in Python ClientForm?

Hello. I'm using mechanize (which uses clientform) for some web crawling in python and since it doesn't support JS, I want to set a value of an unexistent input in a form (the input is generated by JS). How can I do this? The error is similar to the one you get if you try to execute from mechanize import Browser br = Browser() page = b...

Python Clientform-can not get expexted result

I am trying to search through http://www.wegottickets.com/ with the keywords "Live music". But the returned result is still the main page, not the search result page including lots of live music information. Could anyone show me out what the problem is? from urllib2 import urlopen from ClientForm import ParseResponse response = urlopen...

Python ClientForm Error

Hello, check this snippet: import ClientForm from urllib2 import urlopen page = urlopen('http://garciainteractive.com/blog/topic_view/topics/content/') form = ClientForm.ParseResponse(page, backwards_compat=False) print form[0] The problem is that ClientForm parses the first html form the following way: <POST http://garciainteractiv...

My python auto-login script is broken.

A long time ago, I wrote a little python script to automatically log me on to the wireless network at my office. Here is the code: #!/opt/local/bin/python from urllib2 import urlopen from ClientForm import ParseResponse try: if "Logged on as" in urlopen("https://MYWIRELESS.com/logon").read(): print "Already logged on." else: ...

can not submit query to .aspx page

import urllib2, cookielib import ClientForm from BeautifulSoup import BeautifulSoup first_name = "Jonas" last_name = "Carlsson" '''request url''' url = 'http://www.ratsit.se/BC/Search.aspx' cookiejar = cookielib.LWPCookieJar() cookiejar = urllib2.HTTPCookieProcessor(cookiejar) opener = urllib2.build_opener(...

how to submit the query to http://www.ratsit.se/BC/Search.aspx ? I write a script but seems something wrong with the "Click" button

import urllib2, cookielib import ClientForm from BeautifulSoup import BeautifulSoup first_name = "Mona" last_name = "Sahlin" url = 'http://www.ratsit.se/BC/Search.aspx' cookiejar = cookielib.LWPCookieJar() cookiejar = urllib2.HTTPCookieProcessor(cookiejar) opener = urllib2.build_opener(cookiejar) urllib2.install_opener(opener) respons...