Skip to content

Commit

Permalink
fix bandit
Browse files Browse the repository at this point in the history
  • Loading branch information
subzeroid committed Dec 16, 2023
1 parent 969b2c9 commit 162d0f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions instagrapi/image_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def prepare_image(
"""
min_size = kwargs.pop("min_size", (320, 167))
if is_remote(img):
res = requests.get(img)
res = requests.get(img, timeout=5)
im = Image.open(io.BytesIO(res.content))
else:
im = Image.open(img)
Expand Down Expand Up @@ -210,7 +210,7 @@ def prepare_video(

if is_remote(vid):
# Download remote file
res = requests.get(vid)
res = requests.get(vid, timeout=5)
temp_video_file.write(res.content)
video_src_filename = temp_video_file.name
else:
Expand Down

0 comments on commit 162d0f4

Please sign in to comment.