Created
August 4, 2014 23:19
-
-
Save MasterOdin/6b9267946aaaee6f7178 to your computer and use it in GitHub Desktop.
Python QRServer API Script
This file contains 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 requests | |
import urllib | |
from PIL import Image | |
from StringIO import StringIO | |
base = "http://forums.somethingawful.com/showthread.php?" | |
base = base + "threadid=3571852&pagenumber=204#lastpost" | |
url = urllib.quote(base) | |
r = requests.get("http://api.qrserver.com/v1/create-qr-code/?data=" + url + "&size=200x200") | |
print r.status_code | |
i = Image.open(StringIO(r.content)) | |
i.show() | |
# use i.save(name,format) here probably |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment