I\'m got this function and it takes in the html code of wikipedia pages. It takes forever to run, any ideas how to make it more efficient?