Skip Navigation

Scout Archives

Home Projects Publications Archives About Sign Up or Log In

Mechanical Soup

MechanicalSoup is a Python library that allows programs to interact with websites. Rather than running a full web browser, it combines the Requests library for http sessions and the BeautifulSoup library for HTML document parsing. This approach consumes fewer resources than a full browser would and does not require the installation of additional external tools. However, it also lacks a Javascript environment; so, sites that require Javascript to function will not work. The MechanicalSoup tutorial presents two examples of automated interactions with websites. In the first example, data is posted to a demo online order form. In the second example, MechanicalSoup logs in to GitHub and views the list of commits against a specified project. Several additional examples are available in the MechanicalSoup GitHub repository. The MechanicalSoup documentation also provides a detailed reference to the API. The FAQ provides some information on use cases for which MecahnicalSoup is well suited, along with links to other tools that may be more appropriate for other use cases. MechanicalSoup requires Python to run and can be installed via the Python `pip` tool.
Archived Scout Publication URL
Scout Publication
GEM Subject
Date of Scout Publication
March 5th, 2021
Date Of Record Creation
February 12th, 2021 at 1:45pm
Date Of Record Release
February 18th, 2021 at 9:25am
Resource URL Clicks
Add Comment


(no comments available yet)