Find Specific Text In Beautifulsoup
I have a specific piece of text i'm trying to get using BeautifulSoup and Python, however I am not sure how to get it using sou.find(). I am trying to obtain '#1 in Beauty' only fr
Solution 1:
You need to use the find_all method of soup
. Try below
import urllib, urllib2
from bs4 import BeautifulSoup, Comment
url='your url here'
content = urllib2.urlopen(url).read()
soup = BeautifulSoup(content, "html.parser")
print soup.find_all('#1 in Beauty')
Post a Comment for "Find Specific Text In Beautifulsoup"