Replaced parsing html with regexes with BeautifulSoup