Skip to content

Instantly share code, notes, and snippets.

@SalemHarrache
Last active October 16, 2019 13:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SalemHarrache/4598747 to your computer and use it in GitHub Desktop.
Save SalemHarrache/4598747 to your computer and use it in GitHub Desktop.
Anonfiles API upload with requests
#!/usr/bin/env python
from __future__ import unicode_literals, print_function
import requests
from clize import clize, run
URL = "https://anonfiles.com/api/hotlink"
@clize
def upload(filename):
with open(filename) as f:
# data = {'data': 'data'}
r = requests.post(url=URL, files={'file': f})
print(r.text)
if __name__ == '__main__':
run(upload)
@SalemHarrache
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment