def download(self, url):
try:<EOL><INDENT>track = self.client.get('<STR_LIT>', url=url)<EOL><DEDENT>except HTTPError:<EOL><INDENT>log.error(f"<STR_LIT>")<EOL>return<EOL><DEDENT>r = requests.get(self.client.get(track.stream_url, allow_redirects=False).location, stream=True)<EOL>total_size = int(r.headers['<STR_LIT>'])<EOL>chunk_size = <NUM_LIT><EOL>file_name = track.title + '<STR_LIT>'<EOL>with open(file_name, '<STR_LIT:wb>') as f:<EOL><INDENT>for data in tqdm(r.iter_content(chunk_size), desc=track.title, total=total_size / chunk_size, unit='<STR_LIT>', file=sys.stdout):<EOL><INDENT>f.write(data)<EOL><DEDENT><DEDENT>return file_name<EOL>
Downloads a MP3 file that is associated with the track at the URL passed.

:param str url: URL of the track to be downloaded