python beautifulsoup find_all by id code example
Example 1: python beautifulsoup find_all
import re
soup.find_all(re.compile("^b")):
soup.find_all('b')
soup.find_all(["a", "b"])
Example 2: beautifulsoup find_all by id
from BeautifulSoup import BeautifulSoup
f = open('/Users/myUserName/Desktop/contacts.html')
soup = BeautifulSoup(f)
list = soup.findAll('div', attrs={'class':'fcontent'})
print len(list)