'The get_contents() member function loads the file into memory and
reads the contents. The file buffer is then closed and then a
BeautifulSoup object is instantiated, with the contents. More on
this can be read at the BeautifulSoup documentation website
(https://www.crummy.com/software/BeautifulSoup/bs4/doc/).'

def get_contents(self):

    with open('download/packages.html') as f:
        contents = f.read()
    contents = BeautifulSoup(contents, 'html.parser', from_encoding='utf-8')
    return contents
