Re: [Tutor] (regular expression)

2016-12-10 Thread Martin A. Brown
Hello Isaac, This second posting you have made has provided more information about what you are trying to accomplish and how (and also was readable, where the first one looked like it got mangled by your mail user agent; it's best to try to post only plain text messages to this sort of mailin

Re: [Tutor] (regular expression)

2016-12-10 Thread isaac tetteh
this is the real code with urllib.request.urlopen("https://www.sdstate.edu/electrical-engineering-and-computer-science";) as cs: cs_page = cs.read() soup = BeautifulSoup(cs_page, "html.parser") print(len(soup.body.find_all(string = ["Engineering","engineering"]))) i used control +

Re: [Tutor] (no subject)

2016-12-10 Thread Bob Gailer
On Dec 10, 2016 12:15 PM, "Tetteh, Isaac - SDSU Student" < isaac.tet...@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

[Tutor] (no subject)

2016-12-10 Thread Tetteh, Isaac - SDSU Student
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.parser") print(len(soup.find_all(string=["Engineering","engineering"]))) But the result is