Merge branch 'develop' into refresh
This commit is contained in:
commit
6e53e8b9bd
3 changed files with 14 additions and 11 deletions
|
@ -45,3 +45,10 @@ Are you wearing space pants? Because your ass is out of this world.
|
||||||
Nice legs. What time do they open?
|
Nice legs. What time do they open?
|
||||||
Are you lost? Because it’s so strange to see an angel so far from heaven.
|
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'])
|
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['title'], data['user']['username'], desc, genre, data['playback_count'], data['download_count'],
|
||||||
data['comment_count'], url)
|
data['comment_count'], url)
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,15 @@
|
||||||
import random
|
import random
|
||||||
|
|
||||||
from util import hook, http
|
from util import hook, http, web
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def stock(inp):
|
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&'
|
query = "SELECT * FROM yahoo.finance.quote WHERE symbol=@symbol LIMIT 1"
|
||||||
'env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys')
|
quote = web.query(query, {"symbol": sym}).one()
|
||||||
|
|
||||||
parsed = http.get_json(url, q='select * from yahoo.finance.quote '
|
|
||||||
'where symbol in ("%s")' % inp) # heh, SQLI
|
|
||||||
|
|
||||||
quote = parsed['query']['results']['quote']
|
|
||||||
|
|
||||||
# if we dont get a company name back, the symbol doesn't match a company
|
# if we dont get a company name back, the symbol doesn't match a company
|
||||||
if quote['Change'] is None:
|
if quote['Change'] is None:
|
||||||
|
|
Reference in a new issue