From b6ce9b7e506d50a84159e1f7f632b58c06ad46ad Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Sun, 3 Nov 2013 05:08:09 +0800 Subject: [PATCH 1/3] Wow, how did that happen? --- plugins/soundcloud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/soundcloud.py b/plugins/soundcloud.py index f2e3a5d..034a2f5 100644 --- a/plugins/soundcloud.py +++ b/plugins/soundcloud.py @@ -21,7 +21,7 @@ def soundcloud(url, api_key): url = web.try_isgd(data['permalink_url']) - return u"SoundCloud track: \x02{}\x02 by \x02{}user\x02 {}{}- {} plays, {} downloads, {} comments - {}".format( + return u"SoundCloud track: \x02{}\x02 by \x02{}\x02 {}{}- {} plays, {} downloads, {} comments - {}".format( data['title'], data['user']['username'], desc, genre, data['playback_count'], data['download_count'], data['comment_count'], url) From d58a8b5c659889269a05a082676acf945ff64ddf Mon Sep 17 00:00:00 2001 From: RobertClarke Date: Sat, 9 Nov 2013 19:29:00 -0800 Subject: [PATCH 2/3] More flirts --- plugins/data/flirts.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/data/flirts.txt b/plugins/data/flirts.txt index f5eed69..6490da8 100755 --- a/plugins/data/flirts.txt +++ b/plugins/data/flirts.txt @@ -44,4 +44,11 @@ Do you live on a chicken farm? Because you sure know how to raise cocks. Are you wearing space pants? Because your ass is out of this world. Nice legs. What time do they open? Are you lost? Because it’s so strange to see an angel so far from heaven. -Your daddy must have been a baker, because you've got a nice set of buns. \ No newline at end of file +Your daddy must have been a baker, because you've got a nice set of buns. +You're so beautiful that last night you made me forget my pickup line. +I've never seen such dark eyes with so much light in them. +I think we should just be friends with sexual tension. +Whenever I see you I feel like a dog dying to get out of the car. +If I'd have held you any closer I'd be in back of you. +I wish I were on Facebook so I could poke you. +I want you like JFK wanted a car with a roof. From 3d739483de3057cc3260f4c8afac17c6d1954356 Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Mon, 11 Nov 2013 09:46:09 +1300 Subject: [PATCH 3/3] switch to integrated YQL code --- plugins/stock.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/plugins/stock.py b/plugins/stock.py index 894748d..ecb6e9a 100755 --- a/plugins/stock.py +++ b/plugins/stock.py @@ -1,19 +1,15 @@ import random -from util import hook, http +from util import hook, http, web @hook.command def stock(inp): - """.stock -- gets stock information""" + """stock -- gets stock information""" + sym = inp.strip().lower() - url = ('http://query.yahooapis.com/v1/public/yql?format=json&' - 'env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys') - - parsed = http.get_json(url, q='select * from yahoo.finance.quote ' - 'where symbol in ("%s")' % inp) # heh, SQLI - - quote = parsed['query']['results']['quote'] + query = "SELECT * FROM yahoo.finance.quote WHERE symbol=@symbol LIMIT 1" + quote = web.query(query, {"symbol": sym}).one() # if we dont get a company name back, the symbol doesn't match a company if quote['Change'] is None: