0
我想使用Mechanize(使用Python)提交表单,但不幸的是页面编码严重且<select>
元素实际上并不在<form>
标签内。使用机械化与不在表单内的选择字段?
所以我无法通过形式使用传统的方法:
forms = [f for f in br.forms()]
mycontrol = forms[1].controls[0]
我能做些什么呢?
这里是page I would like to scrape,以及相关的代码位 - 我感兴趣的la
选择项:
<fieldset class="searchField">
<label>By region/local authority</label>
<p id="regp">
<label>Region</label>
<select id="region" name="region"><option></option></select>
</p>
<p id="lap">
<label>Local authority</label>
<select id="la" name="la"><option></option></select>
</p>
<input id="byarea" type="submit" value="Go" />
<img id="regmap" src="/schools/performance/img/map_england.png" alt="Map of regions in England" border="0" usemap="#England" />
</fieldset>
非常感谢!我应该意识到,如果没有'