- [Instructor] Welcome to the next video of section five.
Downloading a Web Page as Plain Text.
In the previous video, we've seen
about downloading from a web page.
In this video, we'll learn how to download a web page
as plain text by using HTML tags.
Web pages are HTML pages that contain a collection
of HTML tags along with other elements,
such as JavaScript and CSS.
Of these, the HTML tags define the content of a web page,
which we can parse to look for specific content.
And this is something bash scripting can help us with.
When we download a web page, we receive an HTML file,
and in order to view the formatted page,
it should be viewed in a web browser.
In most of the circumstances,
parsing a text document will be easier
than parsing HTML data because we are
required to strip off the HTML tags.
Links is an interesting command line web browser.
We can get to the web page's plain text.
Let's see how to do it.
Let's download the web page view
in ASCII character representation in a text file
by using the minus dump frag with a Links command.
This command will also list all the hyperlinks,
brackets, brackets
separately under a heading references
as the footer of a text output.
This will help us avoid passing of links
separately by using regular expressions.
For example, you can see the plain text
version of text by using the capt command, as follows.
Awesome, we've successfully learned how to
download a web page as plain text.
In the next video, we'll learn about a primer on cURL.