gpt4 book ai didi

python - Mechanize 提交表单错误: Insufficient items with name '10427'

转载 作者:太空宇宙 更新时间:2023-11-03 18:21:18 26 4
gpt4 key购买 nike

我正在尝试使用 Mechanize 提交表单,我尝试了不同的方法,但问题仍然存在。谁可以帮我这个事。预先感谢您!

这是我要提交的表格:http://www.stpairways.st/

这是我正在使用的代码:

def stp_airways(url):
import re
import mechanize

br = mechanize.Browser()
br.open(url)
print br.title()
br.select_form(name = "frmbook")
br.form['TypeTrajet'] = ["1"]
br.form['id_depart'] = ["11967"]
br.form['id_arrivee'] = ["10427"]
br.form['txtDateAller'] = "5/7/2014"
br.form['txtDateRetour'] = "12/7/2014"
br.form['TypePassager1u1000r0b1'] = ["1"]
br.form['TypePassager2u1000r0b1'] = ["0"]
br.form['TypePassager3u1000r0b1'] = ["0"]
br.form['CodeIsoDeviseClient'] = ["17,20,23,24,25,26,27,28,29,30,31,33,34,36,37,64,65,67,68,70,73,80,81,95,96,103,147,151,152,159,160,162,169,170TP1TPF"]
br.form['CodeIsoDeviseClient'] = ["EUR"]

# submit
response1 = br.submit()
print response1.read()

最佳答案

检查 id 10427 和 119667 之间是否有航类和对于表单提交使用

br.submit(name='Place the id of the submit button',label='And its label here')

关于python - Mechanize 提交表单错误: Insufficient items with name '10427' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24093330/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com