def file_download_using_requests(self,url):
file_name=url.split('<STR_LIT:/>')[-<NUM_LIT:1>]<EOL>if os.path.exists(os.path.join(os.getcwd(),file_name)):<EOL><INDENT>print('<STR_LIT>')<EOL>return<EOL><DEDENT>try:<EOL><INDENT>r=requests.get(url,stream=True,timeout=<NUM_LIT:200>)<EOL><DEDENT>except requests.exceptions.SSLError:<EOL><INDENT>try:<EOL><INDENT>response=requests.get(url,stream=True,verify=False,timeout=<NUM_LIT:200>)<EOL><DEDENT>except requests.exceptions.RequestException as e:<EOL><INDENT>print(e)<EOL>quit()  <EOL><DEDENT><DEDENT>except requests.exceptions.RequestException as e:<EOL><INDENT>print(e)<EOL>quit() <EOL><DEDENT>chunk_size = <NUM_LIT><EOL>total_size = int(r.headers['<STR_LIT>'])<EOL>total_chunks = total_size/chunk_size<EOL>file_iterable = r.iter_content(chunk_size = chunk_size)<EOL>tqdm_iter = tqdm(iterable = file_iterable,total = total_chunks,unit = '<STR_LIT>',<EOL>leave = False<EOL>)  <EOL>with open(file_name,'<STR_LIT:wb>') as f:<EOL><INDENT>for data in tqdm_iter:<EOL><INDENT>f.write(data)<EOL><DEDENT><DEDENT>'''<STR_LIT>'''<EOL>print('<STR_LIT>'%file_name)<EOL>
It will download file specified by url using requests module