def find_all(string, sub, start=None, end=None, ignore_case=False):
 if ignore_case:
  sub = sub.lower()
  string = string.lower()
 while True:
  start = string.find(sub, start, end)
  if (start == (-1)):
   return
  (yield start)
  start += len(sub)

def find_all ( string , sub , start = None , end = None , ignore_case = False ) : if ignore_case : sub = sub . lower ( ) string = string . lower ( ) while True : start = string . find ( sub , start , end ) if ( start == ( - 1 ) ) : return ( yield start ) start += len ( sub )
the find and find_all methods of beautifulsoup dont handle the text parameter combined with other parameters .