I am trying to submit a HTML form without launching a browser.
here is the code.
import requests
r = requests.get('https://www.isi.uu.nl/Research/Databases/DRIVE/download.php')
r.content.decode('UTF-8')
which gets me a bunch of HTML, which contains a link
<form enctype="multipart/form-data" action="process_download.php" method="post">\r\n <P>Please enter your e-mail address: <input type="text" name="usermail"/><input type="submit" value="Send mail" /></P>\r\n</form>
is there a way to fill in the content and submit this form without launching a browser in Python?
the whole process of the program would be,
- set request to an URL.
- keep the session
- fill in some content and submit the form automatically without launching a browser.