@authenticated<EOL>def download_rec(session, rec_url, target_path):
try:<EOL><INDENT>resp = session.get(session.auth.base_url + rec_url)<EOL><DEDENT>except RequestException:<EOL><INDENT>raise VooblyError('<STR_LIT>')<EOL><DEDENT>try:<EOL><INDENT>downloaded = zipfile.ZipFile(io.BytesIO(resp.content))<EOL>downloaded.extractall(target_path)<EOL><DEDENT>except zipfile.BadZipFile:<EOL><INDENT>raise VooblyError('<STR_LIT>')<EOL><DEDENT>return downloaded.namelist()[<NUM_LIT:0>]<EOL>
Download and extract a recorded game.