webm fix
This commit is contained in:
parent
ea4edf8ce3
commit
66cdb5ccb5
3 changed files with 6 additions and 1 deletions
|
@ -206,6 +206,7 @@ def api_comment(v):
|
|||
with open("video.mp4", 'rb') as f:
|
||||
try: url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||
except: return {"error": "Imgur error"}, 400
|
||||
if url.endswith('.'): url += 'mp4'
|
||||
body += f"\n\n{url}"
|
||||
else: return {"error": f"Image/Video files only"}, 400
|
||||
|
||||
|
@ -706,6 +707,7 @@ def edit_comment(cid, v):
|
|||
with open("video.mp4", 'rb') as f:
|
||||
try: url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||
except: return {"error": "Imgur error"}, 400
|
||||
if url.endswith('.'): url += 'mp4'
|
||||
body += f"\n\n{url}"
|
||||
else: return {"error": f"Image/Video files only"}, 400
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue