Exemplo n.º 1
0
  def extract_media(self, artist):
    videos = []
    
    for video in artist.get_videos('youtube'):
      logger.debug('Fetching video information for: %s' % video.media_id)
        
      video = api.video_info(video.media_id)

      videos.append(_trans_video(video, 'media-extractor:youtube-videos'))

    return videos
Exemplo n.º 2
0
  def handle(self, artist, uri):
    protocol, video_id = uri.split(':')

    video = api.video_info(video_id)

    return artist_matcher.associate_video_with_artist(artist, _trans_video(video, 'artist-resource-handler:youtube').get_video())