From 8769b97dc0de2a169457af79bfbbdb04d742871f Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Wed, 4 Sep 2013 20:14:14 +1200 Subject: [PATCH] made qr.py use the google API directly, also did a neat thing with a dictionary --- plugins/qr.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/qr.py b/plugins/qr.py index ae26891..8ab36f6 100644 --- a/plugins/qr.py +++ b/plugins/qr.py @@ -7,7 +7,13 @@ from util import hook, web, http def qrcode(inp, bot=None): "qrcode [link] returns a link for a QR code." - link = "http://blny.tk/qr.php?q=%s" % http.quote_plus(inp) + args = { + "cht": "qr", # chart type + "chs": "200x200", # dimensions + "chl": inp + } + + link = http.prepare_url("http://chart.googleapis.com/chart", args) return web.try_isgd(link)