Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #beautifulsoup #id
ADD COMMENT
Topic
Name
4+3 =