[Tutor] (no subject)

Tetteh, Isaac - SDSU Student isaac.tetteh at jacks.sdstate.edu
Thu Dec 8 20:45:05 EST 2016


Hello,

I am trying to find the number of times a word occurs on a webpage so I used bs4 code below

Let assume html contains the "html code"
soup = BeautifulSoup(html, "html.pa<http://html.pa>rser")
print(len(soup.fi<http://soup.fi>nd_all(string=["Engineering","engineering"])))
But the result is different from when i use control + f on my keyboard to find

Please help me understand why it's different results. Thanks
I am using Python 3.5





Sent from my Verizon LG Smartphone


More information about the Tutor mailing list