populate non-form elements with mechanize or other python library

68 views Asked by At

I am currently filling out a form on a web page using Python's Mechanize. However, when I click on some parts of the form, they bring up hidden divs and display those to the user as a pop-out to get more information. These divs exist in the page source so I can see them in Mechanize, but they are not actually part of a form element and therefore can't be filled in with Mechanize (that I know of).

Does anyone know how to either fill-in non-form elements with Mechanize, or is there another library that can be used in conjunction with Mechanize to achieve the desired results? I know many people will want to suggest Selenium, but this code is run on a headless server and therefore Selenium is not a viable option since there is no browser. Thanks for any suggestions.

0

There are 0 answers