mirror of
https://github.com/hongtaocai/googlefinance.git
synced 2025-02-25 18:55:20 -06:00
fix a bug while getQuotes()'s input is a unicode
getQuotes() parses a single unicode symbol as a list. We should treat it as a single symbol.
This commit is contained in:
parent
d5a6aa096c
commit
73cc575b66
@ -99,7 +99,7 @@ def getQuotes(symbols):
|
||||
:param symbols: a single symbol or a list of stock symbols
|
||||
:return: real-time quotes list
|
||||
'''
|
||||
if type(symbols) == type('str'):
|
||||
if type(symbols) == type('str') or type(symbols) == type(u'unicode'):
|
||||
symbols = [symbols]
|
||||
content = json.loads(request(symbols))
|
||||
return replaceKeys(content);
|
||||
|
Loading…
Reference in New Issue
Block a user