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://garciainteractive.com/blog/topic_view/topics/content/ application/x-www-form-urlencoded
<HiddenControl(ACT=1) (readonly)>
<HiddenControl(RET=http://garciainteractive.com/blog/topic_view/topics/content/) (readonly)>
<HiddenControl(URI=/blog/topic_view/topics/content/) (readonly)>
<HiddenControl(PRV=) (readonly)>
<HiddenControl(XID=d840927d4eaf95cef7aeca789009fb3991f574da) (readonly)>
<HiddenControl(entry_id=42) (readonly)>
<HiddenControl(site_id=1) (readonly)>
<CheckboxControl(save_info=[yes])>
<CheckboxControl(notify_me=[yes])>
<TextControl(captcha=)>
<SubmitControl(submit=Submit) (readonly)>>
Thus, not finding name
, email
and url
inputs. How can I fix it? TIA
Update: Actually, I'm not using ClientForm separately, but as a part of mechanize, thus would prefer a solution allowing to fix without rewriting mechanize code