7 – M5 SC 14 Searching The Parse Tree Part 3 V1

Hello, and welcome back. In this notebook, we will take a look at the recursive argument in the FindAll method. But in order to understand how the recursive argument works, we must first take a look at some basic properties of child tags. So, let’s get started. For simplicity, in the following examples, we will … Read more

6 – M5 SC 13 Searching The Parse Tree Part 2 V1

Hello and welcome back. In this notebook, we will see how to search the parse tree using the class attribute and regular expressions. So, let’s begin by looking at the class attribute. Let’s suppose we wanted to find all the tags that had the attribute class equals “h2style.” Unfortunately, in this case, we can’t simply … Read more

5 – M5 SC 12 Searching The Parse Tree Part 1 V1

Hello and welcome back. In this notebook, we will begin to explore how to search the parse tree created by BeautifulSoup. Now, BeautifulSoup provides a number of methods for searching the tree, but we will only cover the find all method in these lessons. If you’re interested, you can learn about other search methods in … Read more

4 – M5 SC 11 Navigating The Parse Tree V1

Hello and welcome back. In this notebook, we will learn how to navigate the parse tree created by BeautifulSoup. So the most straightforward way of navigating the tree is by accessing the HTML or XML tags. We can access the tags as if they were attributes of the BeautifulSoup object as shown here. So let’s … Read more

3 – M5 SC 10 Parsing An HTML File V1

Hello and welcome back. In this notebook, we will see how to parse an HTML file. In order to parse an HTML file, we need to parse the file into the BeautifulSoup constructor. We can parse our file to the BeautifulSoup constructor either as a string or as an open file handle as we have … Read more

2 – M5 SC 16 HTML Structure V1

Hello and welcome back. Before we start working with Beautiful Soup, let’s take a quick look at how HTML works. Now, you don’t have to be an HTML expert in order to use Beautiful Soup, but it’s definitely important to know the basic workings of HTML. HTML stands for Hypertext Markup Language, and it is … Read more

1 – AIT M5L4B 06 Introduction To Beautifulsoup V3

In the previous lessons, you learned how to create regular expressions and use them to find a specific patterns of text in documents. In some cases however, the text you want to analyze maybe already formatted as a website rather than in a plain text document. In principle, you could say the HTML contents of … Read more