3

画像タイプのボタンをクリック/送信したい

<input type="image" onclick="javascript:return showhide();" src="IMAGES/login.gif" name="submit">

私は以下を試しました

mech = mechanize.Browser(factory=mechanize.RobustFactory())
mech.open(url)
mech.select_form(nr=0)
mech["username"] = options.user
mech["password"] = options.pswd
results = mech.submit().read()

ただし、結果にはログインページのみが含まれます。Pythonmechanizeを使用してタイプが画像である送信のクリックをエミュレートする方法。

4

0 に答える 0