In this video,
we will walk through the tools that you need to get set up in
order to start scraping web media using Python.
The basics we'll outline with Python are the same no matter what development
language you decide to use as most languages have similar or alternate
libraries and tools available. I'm going to assume that you have Python
version 3 installed together with the PIP3 utility.
If you're not familiar with Python,
I suggest that you first take the Python Fundamentals
course on Pluralsight before continuing.
The first libraries we'll install for extracting web media links are
Requests version 2.21 or greater and Lxml 2.92 or greater. We can get
these using the pip utility on the terminal command line. Requests is a
HTTP client library, and we'll use it to connect to a web server and
download data such as the HTML web page, a JSON file, or another
binary‑based data resource.
Lxml is a library used to parse HTML from a web page.
It does this by loading the HTML into an object called the document
object model and then allowing you to use standard selectors to
extract the data that you want. For this course, I'm using the free
Microsoft Visual Code editor,
but you can use any editor of your choice or even work
from the command line if you prefer.