Created
October 25, 2009 20:40
-
-
Save Maffsie/218238 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys | |
import ImageGrab | |
import Image | |
import urllib2 | |
import win32clipboard | |
#Slurp Client settings | |
slurpUsername = "username" | |
slurpPassword = "password" | |
slurpDomain = "localhost" | |
#End settings | |
im = ImageGrab.grabclipboard() | |
if isinstance(im, Image.Image): | |
#WE HAVE IMAGE. | |
im.save("image.png") | |
uData = {'doWork': '1' | |
'hType': 'file' | |
'fupld': open('image.png') | |
} | |
out = urllib2.urlopen('http://%s/sApi.php?u=%s&p=%s' % (slurpDomain,slurpUsername,slurpPassword), uData) | |
surl = out.read() | |
print surl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment