#!/usr/bin/env python import fileinput import requests BASE_URL = 'http://paste.quacknet.org/' PASTE_URL = BASE_URL + 'paste/' document = [] def qp_up(document): document = ''.join(document) r = requests.post(PASTE_URL, data = { 'pb-input': document }) print(r.url) def main(): for line in fileinput.input(): document.append(line) qp_up(document) if __name__ == "__main__": main()