jdjufrw
This commit is contained in:
parent
e0bad276de
commit
477a10fcd9
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@ def upload_video(file):
|
||||||
headers = {"Authorization": f"Client-ID {IMGUR_KEY}"}
|
headers = {"Authorization": f"Client-ID {IMGUR_KEY}"}
|
||||||
with open(file_path, 'rb') as f:
|
with open(file_path, 'rb') as f:
|
||||||
try:
|
try:
|
||||||
r = requests.post('https://api.imgur.com/3/upload', headers=headers, data={"video": f})
|
r = requests.post('https://api.imgur.com/3/upload', headers=headers, files={"video": f})
|
||||||
print(r.text)
|
print(r.text)
|
||||||
#r.raise_for_status()
|
#r.raise_for_status()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue