Check if word appears twice in webpage with python
<p>I'm logging into a site and then searching the site. From the results I'm searching through the html and seeing if I get a match. It all works perfectly except for the fact that the site says "Search results for xyz" which is picked up by my search so I always get a positive result when it could be negative. My current code</p>

<pre><code>... Previous code to log in etc...

words = ['xyz']

br.open ('http://www.example.com/browse.php?psec=2&amp;search=%s' % words)
html = br.response().read()

for word in words:
   if word in html:
      print "%s found." % word
   else:
      print "%s not found." % word
</code></pre>

<p>As a solution I would like to check if the word appears twice or more and if so then it is positive. If it appears only once then it is obviously just the "Search results for xyz" that is being picked up so it is not found. How would I go about adapting my current code to check for two occurrences and not just one? </p>

<p>Thanks</p>
