Installing Mechanical Soup and Making a Plan
00:00
I will go ahead and install MechanicalSoup
into my virtual environment, `python -m pip install MechanicalSoup, and press Enter.
00:14
I got that installed, and next I want to make a new file that I will call fill_
form.py
. Okay, what do I want to do? Again get the HTML or get access to the HTML,
00:34 find the form, fill the form. I want to submit the form, and then I want to print the title of the redirection page. These are my tasks. And you’ll see this works a little bit differently than the last two ones. In my opinion, it’s kind of like the most fun of the three, but that’s also because the Mechanical Soup library was built around having some high-level interaction possibilities that are quite intuitive.
01:08 So I’ll probably actually start off again in Python interpreter to just play around with this and see where we can get to just using the high-level interface that Mechanical Soup provides.
01:20 Double-check that this was installed correctly
01:25
import MechanicalSoup
looks like it’s working, perfect. Let’s keep it at that. And then the next lesson, let’s start exploring the page from the Python REPL using MechanicalSoup.
Become a Member to join the conversation.