Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib.request
- import urllib.parse
- def main():
- def pastebinner():
- site = 'https://pastebin.com/api/api_post.php'
- dev_key = 'APIKEYGOESHERE'
- code = "12345678910, test"
- our_data = urllib.parse.urlencode({"api_dev_key": dev_key, "api_option": "paste", "api_paste_code": code})
- our_data = our_data.encode()
- request = urllib.request.Request(site, method='POST')
- resp = urllib.request.urlopen(request, our_data)
- print(resp.read())
- pastebinner()
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment