Merge branch 'develop' into refresh
This commit is contained in:
commit
6e53e8b9bd
3 changed files with 14 additions and 11 deletions
|
@ -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.
|
||||
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.
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
import random
|
||||
|
||||
from util import hook, http
|
||||
from util import hook, http, web
|
||||
|
||||
|
||||
@hook.command
|
||||
def stock(inp):
|
||||
""".stock <symbol> -- gets stock information"""
|
||||
"""stock <symbol> -- 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:
|
||||
|
|
Reference in a new issue