fix python3 support

This commit is contained in:
Austin Hartline 2016-05-10 13:19:40 -05:00
parent d5a6aa096c
commit 6a541b7fda
3 changed files with 5 additions and 4 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
*.pyc
build/*

View File

@ -2,5 +2,5 @@ from googlefinance import getQuotes
from googlefinance import getNews
import json
print json.dumps(getQuotes('GOOG'), indent=2)
print json.dumps(getNews("GOOG"), indent=2)
print(json.dumps(getQuotes('GOOG'), indent=2))
print(json.dumps(getNews("GOOG"), indent=2))

View File

@ -52,7 +52,7 @@ def request(symbols):
def requestNews(symbol):
url = buildNewsUrl(symbol)
print "url: ", url
print("url: ", url)
req = Request(url)
resp = urlopen(req)
content = resp.read()
@ -116,4 +116,4 @@ if __name__ == '__main__':
symbols = symbols.split(',')
print(json.dumps(getNews("GOOG"), indent=2))
print(json.dumps(getQuotes(symbols), indent=2))
print(json.dumps(getQuotes(symbols), indent=2))