checked tar.gz downlaod from the script with example
This commit is contained in:
parent
a5f1878158
commit
2b6ffec100
1 changed files with 1 additions and 16 deletions
|
@ -69,18 +69,3 @@ get_results(my_url_file_single
|
||||||
, output_dir = my_outdir
|
, output_dir = my_outdir
|
||||||
, outfile_suffix = my_suffix)
|
, outfile_suffix = my_suffix)
|
||||||
#%%###################################################################
|
#%%###################################################################
|
||||||
url = 'http://biosig.unimelb.edu.au/dynamut/results_prediction/161296287365'
|
|
||||||
host_url = 'http://biosig.unimelb.edu.au'
|
|
||||||
prediction_number = re.search(r'([0-9]+$)', url).group(0)
|
|
||||||
print(prediction_number)
|
|
||||||
dynamut_results_dir = '/home/tanu/git/LSHTM_analysis/dynamut/dynamut_results'
|
|
||||||
tgz_url = f"{host_url}/dynamut/results_file/results_" + prediction_number + '.tar.gz'
|
|
||||||
print(tgz_url)
|
|
||||||
outfile_suffix = 'foo'
|
|
||||||
|
|
||||||
|
|
||||||
target_path = dynamut_results_dir + '/' + outfile_suffix + '_results_' + prediction_number + '.tar.gz'
|
|
||||||
response_tgz = requests.get(tgz_url, stream = True)
|
|
||||||
if response_tgz.status_code == 200:
|
|
||||||
with open(target_path, 'wb') as f:
|
|
||||||
f.write(response_tgz.raw.read())
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue