How to obtain HTML responses using a Python headless browser?

I am working on an automated system that conducts several searches and downloads the outcomes. Initially, I need to authenticate with the website, navigate to the search page, configure the search parameters, execute an HTML request with certain POST values, obtain the HTML response for further analysis, and then download the required items. Could you provide some examples or guidance on how to accomplish this? Which Python packages would be the most suitable for this purpose?