Skip to content

Commit

Permalink
Get imgbb response
Browse files Browse the repository at this point in the history
  • Loading branch information
Audionut committed Nov 23, 2024
1 parent 20949b5 commit 72b6f27
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -2881,6 +2881,8 @@ def exponential_backoff(retry_count, initial_timeout):
}
response = requests.post(url, data=data, timeout=timeout)
response = response.json()
if meta.get('debug'):
console.print('imgbb API response', response)
img_url = response['data'].get('medium', response['data']['image'])['url']
raw_url = response['data']['image']['url']
web_url = response['data']['url_viewer']
Expand Down

0 comments on commit 72b6f27

Please sign in to comment.