import logging


def get_albums(vk_session):
    """Requests accessible photo albums from VK.

    :param vk_session: `VkApi`
    :type vk_session: `VkApi`
    :return: list of albums or None
    :rtype: list or None
    """
    try:
        vk_response = vk_session.method(
            'photos.getAlbums',
            values={
                'owner_id': vk_session.token['user_id'],
                'need_system': 1
            })
        return vk_response['items']
    except Exception:
        logging.info("Couldn't get albums. Sorry.")
        return None