I am trying to parse html using BeautifulSoup to try and extract the webpage title. Sometimes this does not work due to the website being badly written, such as Bad End tag. W
If you want to grab the test between the and <\title> tags you should use this regexp:
<\title>
pattern = "([^<]+)" re.findall(pattern, html_string)