Category Posts Navigation

Mechanical Soup

Posted by Marcus Zillman

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 MechanicalSoup 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.

Copyright © 2017 Internet Scout Research Group – http://scout.wisc.edu . This will be added to Script Resources Subject Tracer™.

Leave a Reply

Facebook Comments

Browse Categories

AwarenessWatch Newsletter