made qr.py use the google API directly, also did a neat thing with a dictionary
This commit is contained in:
parent
488d00e758
commit
8769b97dc0
1 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Reference in a new issue