title: how do you get links with certain words using beautifulsoup
body: <p>This code is for getying links from html webpages, but I want to make it give me only the links with certain words. 
  For instance, only links that have this word in there urls: <code>"www.mywebsite.com/word"</code></p>
  
  <p>My code :</p>
  
  <pre><code>import httplib2
  from BeautifulSoup import BeautifulSoup, SoupStrainer
  
  http = httplib2.Http()
  status, response = http.request('http://www.mywebsite.com')
  
  
  
  for link in BeautifulSoup(response, parseOnlyThese=SoupStrainer('a')):
  
      if link.has_key('href'):
          print link['href']`
  </code></pre>