def user_parse ( data ) : _user = data . get ( 'response' , { } ) . get ( 'user' , { } ) yield 'id' , _user . get ( 'name' ) yield 'username' , _user . get ( 'name' ) yield 'link' , _user . get ( 'blogs' , [ { } ] ) [ 0 ] . get ( 'url' )
python parse data from api
Parse information from the provider .
def user_parse(data):
        """Parse information from the provider."""
        _user = data.get('response', {}).get('user', {})
        yield 'id', _user.get('name')
        yield 'username', _user.get('name')
        yield 'link', _user.get('blogs', [{}])[0].get('url')