def links(self):
    invalid_href = {'#', ''}
    links_html = self.soup.findAll('a', href=True)
    return [link.attrs for link in links_html if (link['href'] not in invalid_href)]
def links(self):
    invalid_href = {'#', }
    links_html = self.soup.findAll('a', href=True)
    return [link.attrs for link in links_html if (link['href'] not in invalid_href)]