forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-10-01 08:34:38 +02:00
parent 88ca58e1de
commit 78507d6422
1 changed files with 1 additions and 4 deletions

View File

@ -837,10 +837,7 @@ def submit_post(v):
elif file.content_type.startswith('video/'):
file.save("video.mp4")
with open("video.mp4", 'rb') as f:
req = requests.post('https://catbox.moe/user/api.php', data={'userhash':CATBOX_KEY, 'reqtype':'fileupload'}, files={'fileToUpload':f})
print(req)
print(req.text)
new_post.url = req.text
new_post.url = requests.post('https://catbox.moe/user/api.php', data={'userhash':CATBOX_KEY, 'reqtype':'fileupload'}, files={'fileToUpload':f}).text
g.db.add(new_post)