Skip to content

Commit 9a5c88b

Browse files
authored
ENH: Updating ARM call for downloads (#906)
1 parent d59d8d6 commit 9a5c88b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

act/discovery/arm.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ def download_arm_data(username, token, datastream, startdate, enddate, time=None
113113
headers = {
114114
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36',
115115
}
116-
req = Request(query_url)
117-
req.add_header(headers)
116+
117+
req = Request(query_url, None, headers)
118118
# get url response, read the body of the message,
119119
# and decode from bytes type to utf-8 string
120120
response_body = urlopen(req).read().decode('utf-8')
@@ -150,8 +150,7 @@ def download_arm_data(username, token, datastream, startdate, enddate, time=None
150150
save_data_url = (
151151
'https://adc.arm.gov/armlive/livedata/' + 'saveData?user={0}&file={1}'
152152
).format(':'.join([username, token]), fname)
153-
req_save = Request(save_data_url)
154-
req_save.add_header(headers)
153+
req_save = Request(save_data_url, None, headers)
155154
output_file = os.path.join(output_dir, fname)
156155
# make directory if it doesn't exist
157156
if not os.path.isdir(output_dir):

0 commit comments

Comments
 (0)