do{//do while loop to look through each line of the HTML file and extract the relevant info
line=br.readLine();
line=br.readLine();
if(line!=null){
if(line!=null){//test if null so we can use the .length method without causing an exception
if(line.length()>=25){
if(line.length()>=25){//test if more than 25 chracters so we can check the substring of the first 25 characters without causing an exception
//System.out.println(line.substring(0,25));
if(line.substring(0,25).equals("<meta property=\"og:title\"")){//if the property value is correct, extract the relevant info and print it, setting the found flag