hii all here i have a code snippet in which i am using beautiful soup to parse value
soup = BeautifulSoup(self.content, 'html.parser')
count = 1
for assumptions in data_list:
for rec in soup.findAll():
if (assumptions.replace(' ', '') in rec.get_text().replace(' ', '') or (assumptions.replace(' ', '') == rec.get_text().replace(' ', ''))
if assumptions in data_list:
data_list.remove(assumptions)
count += 1
Here in self.content
field I am getting the HTML data
,
data_list
is a list of strings
I am searching those strings which are available in the data_list inside the HTML content which is partially working.
some strings that I am searching for are avaliable in HTMl content but still, I am unable to process those in the if condition
.
What will be the if condition
in which I can parse all the strings which are inside the data_list