1. Home
  2. Docs
  3. BeautifulSoup
  4. Find Method | যেভাবে html এলিমেন্ট খুঁজবো

Find Method | যেভাবে html এলিমেন্ট খুঁজবো

# Finding by id
s = soup.find('div', id= 'main')

# Finding by class
s = soup.find('div', class_='entry-content')

#find all 
lines = s.find_all('p')

# Extracting Text from the tags
lines = s.find_all('p')
 
for line in lines:
    print(line.text)
    
    
    
#Scrape Nested Tags using BeautifulSoup
soup.body.table.tag

How can we help?