2012-05-08 40 views

回答

1

我不能重现这个问题,你能举一个具体的例子吗? 甲形式一个DIV元素中:

>>> br.open('http://realworldstyle.com/forms.html') 
>>> print br.forms().next() 

<GET http://realworldstyle.com/forms.html application/x-www-form-urlencoded 
    <TextControl(<None>=)> 
    <TextControl(<None>=)> 
    <TextControl(<None>=)> 
    <TextareaControl(<None>=Go ahead - write something...)>> 
+0

我已编辑的问题。你可以看到它的例子。 – sam

+1

@sam:form_1 = [f for br.forms()] [0]#和form_2 = [f for f in br.forms()] [1] – Vidul

+0

列表索引超出范围 – sam