Abstracting BeautifulSoup functionality