'Download an archive\'s :attr:`~LegendasTVArchive.content`.
:param archive: the archive to download :attr:`~LegendasTVArchive.content` of.
:type archive: :class:`LegendasTVArchive`'

def download_archive(self, archive):

    logger.info('Downloading    archive    %s', archive.id)
    r = self.session.get((self.server_url + 'downloadarquivo/{}'.format(archive.id)))
    r.raise_for_status()
    archive_stream = io.BytesIO(r.content)
    if is_rarfile(archive_stream):
        logger.debug('Identified    rar    archive')
        archive.content = RarFile(archive_stream)
    elif is_zipfile(archive_stream):
        logger.debug('Identified    zip    archive')
        archive.content = ZipFile(archive_stream)
    else:
        raise ValueError('Not    a    valid    archive')
