Automate website interaction with StatefulBrowser
mainMechanicalSoup is a Python library for automating website interaction. It uses Requests for HTTP sessions and BeautifulSoup for document navigation. It automatically handles cookies, follows redirects, and can submit forms, but it does not support JavaScript.
A common pattern is to use mechanicalsoup.StatefulBrowser to maintain a session, open a URL, select a form, fill in fields, and submit it.