def handle(self, artist, uri): protocol, user_id = uri.split(':') profile_link = 'http://www.twitter.com/%s' % user_id name = parsing.get_name_from_title(profile_link, NAME_RE) artist_profile = ArtistProfile(system_id = 'twitter', profile_id = user_id, source_id = 'artist-resource-handler:twitter', url = profile_link) return artist_matcher.associate_profile_with_artist(artist, name, artist_profile)
def handle(self, artist, uri): protocol, user_id = uri.split(':') logger.debug('Fetching profile information for: %s' % user_id) profile = api.MySpaceProfile(user_id) artist_profile = ArtistProfile(system_id = 'myspace', profile_id = user_id, source_id = 'artist-resource-handler:myspace', url = 'http://www.myspace.com/%s' % user_id) return artist_matcher.associate_profile_with_artist(artist, profile.get_name(), artist_profile)