I been trying to fix the code below for a while now, for some reason every part of the code works except the part where it has to click on a radio button, it says "ValueError: Option 1 not found in field " but there is an options that's for 1, it's either 0 or 1. I used to play with mechanize I know what I'm doing for the most part, but can anyone help? Please & Thank you
from robobrowser import RoboBrowser
browser = RoboBrowser(parser='html.parser')
browser.open(url)
form = browser.get_forms()[0]
form['username'] = 'foo'
form['password'] = 'foo'
form['gender'] = [1] #Radio button
browser.session.headers['Referer'] = url
browser.submit_form(form)