Skip to content

Commit

Permalink
Merge pull request #53 from AmmarKothari/use_proxy_for_downlading_files
Browse files Browse the repository at this point in the history
Add proxy arg to get for downloading files
  • Loading branch information
Benehiko committed Dec 12, 2021
2 parents 5f3b6f9 + 936c43b commit 8b6049b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reolinkapi/handlers/api_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def _execute_command(self, command: str, data: List[Dict], multi: bool = False)
tgt_filepath = data[0].pop('filepath')
# Apply the data to the params
params.update(data[0])
with requests.get(self.url, params=params, stream=True, verify=False, timeout=(1, None)) as req:
with requests.get(self.url, params=params, stream=True, verify=False, timeout=(1, None), proxies=Request.proxies) as req:
if req.status_code == 200:
with open(tgt_filepath, 'wb') as f:
f.write(req.content)
Expand Down

0 comments on commit 8b6049b

Please sign in to comment.