Skip to content

Commit 8b6049b

Browse files
authoredDec 12, 2021
Merge pull request #53 from AmmarKothari/use_proxy_for_downlading_files
Add proxy arg to get for downloading files
2 parents 5f3b6f9 + 936c43b commit 8b6049b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎reolinkapi/handlers/api_handler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _execute_command(self, command: str, data: List[Dict], multi: bool = False)
124124
tgt_filepath = data[0].pop('filepath')
125125
# Apply the data to the params
126126
params.update(data[0])
127-
with requests.get(self.url, params=params, stream=True, verify=False, timeout=(1, None)) as req:
127+
with requests.get(self.url, params=params, stream=True, verify=False, timeout=(1, None), proxies=Request.proxies) as req:
128128
if req.status_code == 200:
129129
with open(tgt_filepath, 'wb') as f:
130130
f.write(req.content)

0 commit comments

Comments
 (0)
Please sign in to comment.