I am trying to write a webscraping app to get pesticide labels from the CDPR website. The final part that I can’t manage is simply ticking a checkbox for the pesticide I want to collect info from. The names of the checkboxes are seemingly random.
The attached image has the checkbox I am trying to scape. I cannot for the life of me figure out why these are named the way they are.
I am using Mechanicalsoup and BeautifulSoup4.
I decided to just try and select the first checkbox element but it hasn’t been working.
# Locate the first entry in the table and check the checkbox
browser.page.select_one(["type='checkbox'"])
browser.submit_selected()
print(browser.form.print_summary())
Jaden Clarke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.