[Tutor] (no subject)

Bob Gailer bgailer at gmail.com
Sat Dec 10 14:54:26 EST 2016

On Dec 10, 2016 12:15 PM, "Tetteh, Isaac - SDSU Student" <
isaac.tetteh at jacks.sdstate.edu> wrote:
> 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
> But the result is different from when i use control + f on my keyboard to
> Please help me understand why it's different results. Thanks
> I am using Python 3.5
What is the URL of the web page?
To what are you applying control-f?
What are the two different counts you're getting?
Is it possible that the page is being dynamically altered after it's loaded?

More information about the Tutor mailing list