def usersearch_id(user, channel_id, term):
 query = generate_search_qs(term)
 aliases = dict(views='viewCount')
 if config.USER_ORDER.get:
  query['order'] = aliases.get(config.USER_ORDER.get, config.USER_ORDER.get)
 query['channelId'] = channel_id
 termuser = tuple([((c.y + x) + c.w) for x in (term, user)])
 if term:
  msg = 'Results for {1}{3}{0} (by {2}{4}{0})'
  progtext = ('%s by %s' % termuser)
  failmsg = ('No matching results for %s (by %s)' % termuser)
 else:
  msg = 'Video uploads by {2}{4}{0}'
  progtext = termuser[1]
  if config.SEARCH_MUSIC:
   failmsg = ("User %s not found or has no videos in the Music category.\nUse 'set search_music False' to show results not in the Music category." % termuser[1])
  else:
   failmsg = ('User %s not found or has no videos.' % termuser[1])
 msg = str(msg).format(c.w, c.y, c.y, term, user)
 _search(progtext, query, msg, failmsg)

def usersearch_id ( user , channel_id , term ) : query = generate_search_qs ( term ) aliases = dict ( views = 'viewCount' ) if config . USER_ORDER . get : query [ 'order' ] = aliases . get ( config . USER_ORDER . get , config . USER_ORDER . get ) query [ 'channelId' ] = channel_id termuser = tuple ( [ ( ( c . y + x ) + c . w ) for x in ( term , user ) ] ) if term : msg = 'Results for {1}{3}{0} (by {2}{4}{0})' progtext = ( '%s by %s' % termuser ) failmsg = ( 'No matching results for %s (by %s)' % termuser ) else : msg = 'Video uploads by {2}{4}{0}' progtext = termuser [ 1 ] if config . SEARCH_MUSIC : failmsg = ( "User %s not found or has no videos in the Music category.\nUse 'set search_music False' to show results not in the Music category." % termuser [ 1 ] ) else : failmsg = ( 'User %s not found or has no videos.' % termuser [ 1 ] ) msg = str ( msg ) . format ( c . w , c . y , c . y , term , user ) _search ( progtext , query , msg , failmsg )
performs a search within a users uploads for an optional search term with the user identified by its id .