Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
codaz:python:pastebin_en_console [2010/01/12 13:29]
127.0.0.1 external edit
codaz:python:pastebin_en_console [2010/08/08 21:56] (current)
orion64
Line 47: Line 47:
  str = sys.stdin.read()  str = sys.stdin.read()
  
-data = urllib.urlencode({"​parent_pid":""​,"format": format,"​code2"​ : str, "​poster"​ : "","​paste":"​Send","​expiry":"​d","​email":""​})+data = urllib.urlencode({"​paste_code":str,"paste_format":​format})
  
-f = urllib.urlopen("​http://​pastebin.com/​pastebin.php", data) +f = urllib.urlopen("​http://​pastebin.com/​api_public.php", data) 
-paste_url = f.geturl()+paste_url = f.read()
 f.close() f.close()
  
codaz/python/pastebin_en_console.txt · Last modified: 2010/08/08 21:56 by orion64