def snippetWithLink(self, url):
        """ This method will try to return the first
        <p> or <div> that contains an <a> tag linking to
        the given URL.
        """
        link = self.soup.find("a", attrs={'href': url})
        if link:
            for p in link.parents:
                if p.name in ('p', 'div'):
                    return ' '.join(p.text.split()[0:30])
        return None
This method will try to return the first
        <p> or <div> that contains an <a> tag linking to
        the given URL.