Loading video player…

Taking Notes About Each Subtask

00:00 Alright, so I played around in my Python interpreter to find a possible approach to getting this information out of the big HTML that I’ve scraped earlier.

00:08 Now, let’s take some notes on how to get those. So I want to get the starting index of search string.

00:18 That’ll be name and favorite color.

00:24 Then I want to get the length of such string.

00:30 I want to add the length to the starting index, and then what else did I do? Then I want to slice it, right? So I want to slice the HTML text from whatever the output of this is.

00:49 How should I call that at the length of the starting index. Okay. To get, to get the, and of the search string.

01:00 I wonder whether I’m explaining this too complicated. I want to get to the end of name colon space, right? This is where, where I want to start picking the information.

01:09 And these first three steps basically are just for me to get to this point here, to this index. And then I want to slice the HTML text from that number onwards until, and then what I need to get is the next opening angular bracket.

01:32 And until there I want to slice it. So I need to get the index of the next opening angular bracket and slice the HTML text from there to here, basically. And then I still want to remove the, remove any white space.

01:55 Okay? Those are the sub ideas that I kind of tried out in my Python interpreter below. They’re not super easy to follow. So I could have probably taken better notes, but this is what I came up with now.

02:08 And let’s stick with this for that lesson. And then the next one, I’m going to try to actually tackle these inside of my script and see if I can get to the same endpoint that I then get the name, just the name Dionysus printed out.

Become a Member to join the conversation.