fdfd
This commit is contained in:
parent
b6ebc318f7
commit
11cd40d1fc
2 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ def upload_file(file=None, resize=False, png=False):
|
|||
req = requests.post('https://api.imgur.com/3/upload.json', headers = {"Authorization": f"Client-ID {IMGUR_KEY}"}, data=data)
|
||||
resp = req.json()['data']
|
||||
url = resp['link']
|
||||
if not "_d" in url:
|
||||
if not "_d." in url:
|
||||
url = url.replace(".png", "_d.png").replace(".jpg", "_d.jpg").replace(".jpeg", "_d.jpeg")
|
||||
if "_d." in url: url += "?maxwidth=9999"
|
||||
except: return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue