Created
February 21, 2021 12:02
-
-
Save Syzygianinfern0/6aad721c85aea8ec422ba7c0ea937920 to your computer and use it in GitHub Desktop.
Post to SXCU.NET
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Head over to https://sxcu.net/ | |
# Create a subdomain | |
# Run script | |
# Replace returned sxcu.net base-url by the one you requested | |
# Profit | |
import os | |
import pprint | |
import requests | |
url = 'https://sxcu.net/upload' | |
path_img = '/home/sharan/Downloads/giphy.gif' | |
with open(path_img, 'rb') as img: | |
name_img = os.path.basename(path_img) | |
files = {'image': (name_img, img, 'multipart/form-data', {'Expires': '0'})} | |
with requests.Session() as s: | |
r = s.post(url, files=files) | |
pprint.pprint(r.json()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment