Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Function to post content to pastebin.
- #If you got an account: http://pastebin.com/api to find your DEV Key
- #Written in python 3.4.2
- #By Hardware@Chatango
- def paste(title, content):
- Pastebin_devkey = 'YOUR DEV KEY'
- Pastebin_url_post = 'http://pastebin.com/api/api_post.php'
- pastebin_vars = dict(
- api_option='paste',
- api_dev_key=Pastebin_devkey,
- api_paste_name=title,
- api_paste_code=content,
- api_paste_expire_date = "10M"
- return urllib.request.urlopen(Pastebin_url_post, urllib.parse.urlencode(pastebin_vars).encode('utf8')).read()
- #########################
- #for newbies using ch.py#
- #########################
- room.message(paste("mypastetitle","PasteContent"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement