BeautifulSoup cannot find a tag by class
Here is the part of the web page:
<div class="MPinfo"> <ul class="frontList"> <li>some text</li> <li>some text</li> <li>some text</li> <li>some text</li> <li>some text</li> <li>some text <a href="/some_local_link/8976">some text</a>; <a href="/some_local_link/8943">some text</a>; </li> <li>E-mail: <a href="mailto: Ss.Sssssss@mail.com "> Ss.Sssssss@mail.com </a> </li> </ul> </div> I am trying to get a div by its class and then extract the link by email only for sending by email, for example: Ss.Sssssss@mail.com
page = urllib.urlopen(link) soup = BeautifulSoup(page.read()) print soup.find('div', attrs={'class': 'MPinfo'}) I tried several ways to get a div, but it returns an empty list or None
+5