 What's going on everybody welcome back to another video today. We're gonna be starting our Python web scraping tutorial series Now this is more of a continuation of the Python tutorial series But because we're gonna be focusing on web scraping for three or four videos I wanted to just make it its own little mini series in this series I'm gonna show you the basics of web scraping how to actually look at HTML how to inspect a web page how to pull that data in And then even put it into a CSV file so you can save it and use it now in this series We're just covering the basics which is a fantastic place to start but in future series I'll be going into some of the more advanced web scraping topics as well So without further ado, let's shop on my screen and get started with web scraping now The first thing that we need to learn is HTML HTML stands for hypertext markup language And it's used to describe all of the elements on a web page Now when we actually go to a website and start pulling data and information We need to know HTML so you can specify exactly what we want to take off of that website So that's where HTML comes in and we're gonna look at the basics understanding just the basic structure of HTML Then we'll go look at a real website and you'll kind of see that's a little bit more difficult than what we just have right here But this is the basic building blocks to get to what the HTML actually looks like on a website Now this is basically what HTML looks like we have these angle brackets with things like HTML Head title body and then you'll notice that at the end will have a body And then we'll have a body at the bottom this forward slash body denotes that this is the end of the body section in HTML so everything inside of this is within this body So there is this hierarchy within HTML We have HTML and HTML at the bottom which encapsulates all the HTML on the website Then we have things like head and head body and body now within these sections We usually have things like classes tags attributes text and all these other things things that will get to in different lessons But one of the easiest ones to notice and look at our tags things like a p tag or a title tag Now within these tags because this is a super simple example We have these strings here my first web page and this is what's called a variable string And this is actual text that we could take out of this web page now that you understand these super basics of HTML Let's actually go to our website and I'm gonna have a link down below But it's gonna be this one right here. This is basically just a website that you can you know practice web scraping on It's called scrape this site comm and what we're gonna do is look at the HTML behind this web page And you can do this on any website that you go on so we're gonna right click we're gonna go down to inspect Now right off the bat this looks a lot more complicated and a lot more complex than the very simple Illustration that we're looking at but it's kind of roll this up just a little bit You'll notice we have HTML and HTML at the bottom We have a head and there is the end of the head and then a body and the end of the body So in a super simple sense it is similar But just the information that's within it is a lot more difficult Now if we look at this title right here, this is our title tag if we click this little arrow This is our drop-down. You'll notice that here. We have this string hockey teams forums searching and pagination Now let's say we didn't know we didn't want to click on that and you'll find it There's something that's super helpful within this inspection page that you can click on right here It says select an element in the page to inspect it So we're gonna click on that and as we go through our page And let's click on this title. It's gonna take us to exactly where this is in our HTML This is extremely helpful extremely useful for example. Let's say the data. I want is down here I want to take in the Boston Bruins. I can click on it and it's gonna take me to where that is exactly in the HTML This is where we can start writing our web scraping script to specify. Okay. I'm looking for a TR tag I'm looking for a TD tag. I'm looking for the class called team This is all information and things that we can use to specify exactly what we want to pull out of our web page Now there are other things that we didn't really look at as well in just our simple illustration Let's come right over here. There's things like hrefs now These are hyperlinks. So if we went and then clicked on this This is just regular text But inside of it is this hyperlink where if we clicked on it It would take us to another website and typically that's denoted by this href right here Then you'll typically see things like a p tag, which usually stands for a paragraph Now the last thing that I want to show you while we're here and we're gonna learn a lot more in the next several lessons But if we come right down here, there is this actual entire table here And let's try to find this table and I'm having trouble selecting the entire thing But let's select this team name and if we look at this team name You can see that this is encapsulating the tables this table tag Now these are super helpful because it takes in the entire table now if we wrap this up and we look just at this It says class table and then we have the end of this table tag now when we open it It's gonna have all of this information. So as you can see as I'm highlighting over it We have these th tags Then we have these td tags and even these tr tags Which is the individual data and this is something that we'll look at when we're actually scraping all of the data from this Table in a future lesson. So this is how we can use HTML how we can inspect the web page and see exactly What's going on kind of under the hood and then in future lessons We'll see how we can use this HTML to specify exactly what data we want to pull out Thank you guys so much for watching if you liked this video be sure to like and subscribe below I will see you in the next lesson