html - click submit button "OK" on a webpage using python requests module -
html - click submit button "OK" on a webpage using python requests module -
i have device can managed using webpage interface.
the device address can :
http://10.18.25.25/restart
with submit button in webpage:
<form action="/restart/restart" method="post" name="restartform"> <input type="submit" value="ok"> </form>
i trying utilize python module requests automate clicking on button on webpage.
from urllib3 import requests r = requests.get('http://10.18.25.25/restart', auth=('username', 'password'))
any ideas??
from info provided, assume visit page on http://10.18.25.25/restart/
has form, restart device on submit.
the action defined nowadays @ uri /restart/restart
on form. request on same uri:
r = requests.post('http://10.18.25.25/restart/restart', auth=('username', 'password'))
python html urllib3
Comments
Post a Comment