gpt4 book ai didi

Python:点击一个按钮

转载 作者:太空宇宙 更新时间:2023-11-03 14:28:54 24 4
gpt4 key购买 nike

<分区>

我在单击这个在 HTML 代码中看起来像这样的按钮时遇到问题:

<form method="post">
<br>
<input type="hidden" value="6" name="deletetree">
<input type="submit" value="Delete Tree" name="pushed">
</form>

需要生成的 url 如下所示: http://mysite.com/management.php?Category=2&id_user=19&deteletree=6&pushed=Delete+Tree

更新:我试过这个,但它不起作用:

form_data = urllib.urlencode({'Category' : '2', 'suid' : '19', 'deletetree' : '6', 'pushed' : 'Delete+Tree' })
urllib2.urlopen("management.php", form_data)

这是我登录的方式:

cj = cookielib.CookieJar() 
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
opener.addheaders = [('User-agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.29 Safari/525.13')]
username = "user"
password = "pass"
USER_ID = '6'

loginonsite = login("http://mysite.com/myprofile.php",
"login_username=%s&login_password=%s&suid=%s".format(username, password, USER_ID)

)

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