mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Better error checking with Http.stockquote and remove Http.weather's tests.
This commit is contained in:
parent
a1e48a8ff7
commit
f130db33cc
@ -172,6 +172,9 @@ class Http(callbacks.Privmsg):
|
|||||||
previous day of a given compny (represented by a stock symbol).
|
previous day of a given compny (represented by a stock symbol).
|
||||||
"""
|
"""
|
||||||
symbol = privmsgs.getArgs(args)
|
symbol = privmsgs.getArgs(args)
|
||||||
|
if ' ' in symbol:
|
||||||
|
irc.error('Only one stockquote can be looked up at a time.')
|
||||||
|
return
|
||||||
url = 'http://finance.yahoo.com/d/quotes.csv?s=%s' \
|
url = 'http://finance.yahoo.com/d/quotes.csv?s=%s' \
|
||||||
'&f=sl1d1t1c1ohgv&e=.csv' % symbol
|
'&f=sl1d1t1c1ohgv&e=.csv' % symbol
|
||||||
quote = webutils.getUrl(url)
|
quote = webutils.getUrl(url)
|
||||||
|
Loading…
Reference in New Issue
Block a user