Recursively parsing html using BeautifulSoup