Advertisement
stepanus

Untitled

Jan 23rd, 2020
2,542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. API_ENDPOINT = "http://pastebin.com/api/api_post.php"
  2.         # your API key here
  3.         API_KEY = "014f370476ef77822cd3d31184ee9bd0"
  4.        
  5.         # your source code here
  6.         source_code = license
  7.        
  8.         # data to be sent to api
  9.         data = {'api_dev_key':API_KEY,
  10.                 'api_option':'paste',
  11.                 'api_paste_code':source_code,
  12.                 'api_paste_format':'python'}
  13.        
  14.         # sending post request and saving response as response object
  15.         r = requests.post(url = API_ENDPOINT, data = data)
  16.        
  17.         response = r.content
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement