parameters: (self, search_text, pagenumber)
docstring: Search for vidoes that match the search text and output the results a XML to stdout
docstring_summary: Search for vidoes that match the search text and output the results a XML to stdout
docstring_tokens: Search for vidoes that match the search text and output the results a XML to stdout
function: def searchForVideos(self, search_text, pagenumber):
          '''Search for vidoes that match the search text and output the results a XML to stdout
          '''
          self.firstVideo = True
          self.config['target'].page_limit = self.page_limit
          self.config['target'].grabber_title = self.grabber_title
          self.config['target'].mashup_title = self.mashup_title
  
          data_sets = self.config['target'].searchForVideos(search_text, pagenumber)
          if data_sets is None:
              return
          if not len(data_sets):
              return
  
          for data_set in data_sets:
              if self.firstVideo:
                  sys.stdout.write(self.searchXML['header'])
                  sys.stdout.write(self.searchXML['rss'])
                  self.firstVideo = False
              sys.stdout.write(self.searchXML['channel'] % data_set[0])
              if 'nextpagetoken' in data_set[0]:
                  sys.stdout.write(self.searchXML['nextpagetoken'] % data_set[0])
              if 'prevpagetoken' in data_set[0]:
                  sys.stdout.write(self.searchXML['prevpagetoken'] % data_set[0])
              for item in data_set[1]:
                  sys.stdout.write(self.searchXML['item'] % item)
              sys.stdout.write(self.searchXML['end_channel'])
          sys.stdout.write(self.searchXML['end_rss'])
function_tokens: def searchForVideos ( self , search_text , pagenumber ) : self . firstVideo = True self . config [ 'target' ] . page_limit = self . page_limit self . config [ 'target' ] . grabber_title = self . grabber_title self . config [ 'target' ] . mashup_title = self . mashup_title data_sets = self . config [ 'target' ] . searchForVideos ( search_text , pagenumber ) if data_sets is None : return if not len ( data_sets ) : return for data_set in data_sets : if self . firstVideo : sys . stdout . write ( self . searchXML [ 'header' ] ) sys . stdout . write ( self . searchXML [ 'rss' ] ) self . firstVideo = False sys . stdout . write ( self . searchXML [ 'channel' ] % data_set [ 0 ] ) if 'nextpagetoken' in data_set [ 0 ] : sys . stdout . write ( self . searchXML [ 'nextpagetoken' ] % data_set [ 0 ] ) if 'prevpagetoken' in data_set [ 0 ] : sys . stdout . write ( self . searchXML [ 'prevpagetoken' ] % data_set [ 0 ] ) for item in data_set [ 1 ] : sys . stdout . write ( self . searchXML [ 'item' ] % item ) sys . stdout . write ( self . searchXML [ 'end_channel' ] ) sys . stdout . write ( self . searchXML [ 'end_rss' ] )