mirror of
https://github.com/hongtaocai/googlefinance.git
synced 2024-11-04 16:29:23 -06:00
fetch all articles
This commit is contained in:
parent
4f13215cef
commit
3431c5f022
@ -37,7 +37,7 @@ def buildUrl(symbols):
|
||||
return 'http://finance.google.com/finance/info?client=ig&q=' \
|
||||
+ symbol_list
|
||||
|
||||
def buildNewsUrl(symbol, qs=''): #&start=0&num=100
|
||||
def buildNewsUrl(symbol, qs='&start=0&num=1000'):
|
||||
return 'http://www.google.com/finance/company_news?output=json&q=' \
|
||||
+ symbol + qs
|
||||
|
||||
@ -56,7 +56,7 @@ def requestNews(symbol):
|
||||
req = Request(url)
|
||||
resp = urlopen(req)
|
||||
content = resp.read()
|
||||
|
||||
|
||||
content_json = demjson.decode(content)
|
||||
|
||||
#print "total news: ", content_json['total_number_of_news']
|
||||
|
Loading…
Reference in New Issue
Block a user