Skip to content

Commit

Permalink
prod prod
Browse files Browse the repository at this point in the history
  • Loading branch information
skyl committed Apr 7, 2023
1 parent 13fff91 commit 1ddf04e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ def handle(self, *args, **options):
else:
# The thumbnail_url points to another domain
try:
response = requests.get(creator.avatar_url, stream=True)
try:
response = requests.get(
creator.avatar_url, stream=True, timeout=15)
except requests.exceptions.Timeout:
continue
response.raise_for_status()

# Save the remote image as an in-memory file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ def handle(self, *args, **options):
# The thumbnail_url points to another domain
try:
print(creator.banner_url)
response = requests.get(creator.banner_url, stream=True)
try:
response = requests.get(
creator.banner_url, stream=True, timeout=15)
except requests.exceptions.Timeout:
continue
response.raise_for_status()

# Save the remote image as an in-memory file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ def handle(self, *args, **options):
else:
# The thumbnail_url points to another domain
try:
response = requests.get(page.thumbnail_url, stream=True)
try:
response = requests.get(
page.thumbnail_url, stream=True, timeout=15)
except requests.exceptions.Timeout:
continue
response.raise_for_status()

# Save the remote image as an in-memory file
Expand Down

0 comments on commit 1ddf04e

Please sign in to comment.