parameters: (self, title, pagenumber)
return_statement: return None
docstring: Common name for a video search. Used to interface with MythTV plugin NetVision
docstring_summary: Common name for a video search. Used to interface with MythTV plugin NetVision
docstring_tokens: Common name for a video search . Used to interface with MythTV plugin NetVision
function: def searchForVideos(self, title, pagenumber):
          """Common name for a video search. Used to interface with MythTV plugin NetVision
          """
          # Channel details and search results
          self.channel = {
              'channel_title': 'YouTube',
              'channel_link': 'http://www.youtube.com/',
              'channel_description': "Share your videos with friends, family, and the world.",
              'channel_numresults': 0,
              'channel_returned': 1,
              'channel_startindex': 0}
  
          # Easier for debugging
  #        print self.searchTitle(title, pagenumber, self.page_limit)
  #        print
  #        sys.exit()
  
          try:
              data = self.searchTitle(title, pagenumber, self.page_limit)
          except YouTubeVideoNotFound as msg:
              sys.stderr.write("%s\n" % msg)
              return None
          except YouTubeUrlError as msg:
              sys.stderr.write('%s\n' % msg)
              sys.exit(1)
          except YouTubeHttpError as msg:
              sys.stderr.write(self.error_messages['YouTubeHttpError'] % msg)
              sys.exit(1)
          except YouTubeRssError as msg:
              sys.stderr.write(self.error_messages['YouTubeRssError'] % msg)
              sys.exit(1)
          except Exception as e:
              sys.stderr.write("! Error: Unknown error during a Video search (%s)\nError(%s)\n" % (title, e))
              sys.exit(1)
  
          if data is None:
              return None
          if not len(data):
              return None
  
          items = [self.translateItem(match) for match in data]
          self.channel['channel_returned'] = len(items)
  
          if len(items):
              return [[self.channel, items]]
          return None
function_tokens: def searchForVideos ( self , title , pagenumber ) : # Channel details and search results self . channel = { 'channel_title' : 'YouTube' , 'channel_link' : 'http://www.youtube.com/' , 'channel_description' : "Share your videos with friends, family, and the world." , 'channel_numresults' : 0 , 'channel_returned' : 1 , 'channel_startindex' : 0 } # Easier for debugging #        print self.searchTitle(title, pagenumber, self.page_limit) #        print #        sys.exit() try : data = self . searchTitle ( title , pagenumber , self . page_limit ) except YouTubeVideoNotFound as msg : sys . stderr . write ( "%s\n" % msg ) return None except YouTubeUrlError as msg : sys . stderr . write ( '%s\n' % msg ) sys . exit ( 1 ) except YouTubeHttpError as msg : sys . stderr . write ( self . error_messages [ 'YouTubeHttpError' ] % msg ) sys . exit ( 1 ) except YouTubeRssError as msg : sys . stderr . write ( self . error_messages [ 'YouTubeRssError' ] % msg ) sys . exit ( 1 ) except Exception as e : sys . stderr . write ( "! Error: Unknown error during a Video search (%s)\nError(%s)\n" % ( title , e ) ) sys . exit ( 1 ) if data is None : return None if not len ( data ) : return None items = [ self . translateItem ( match ) for match in data ] self . channel [ 'channel_returned' ] = len ( items ) if len ( items ) : return [ [ self . channel , items ] ] return None